package com.lingxu.api.sysdata.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lingxu.api.sysdata.service.IDataGatherService;
import com.lingxu.api.ztb.mapper.DataGatherMapper;
import com.lingxu.api.ztb.model.*;
import com.lingxu.api.ztb.service.*;
import com.lingxu.traffic.service.impl.ApiUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;

import javax.annotation.Resource;
import java.util.List;

/**
 * @program: ptmh
 * @ClassName DataGatherServiceImpl
 * @description:
 * @author: gxy
 * @create: 2025-07-18 12:28
 * @Version 1.0
 **/
@Slf4j
@Service
public class DataGatherServiceImpl implements IDataGatherService {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    @Value("${apiService.orgCode}")
    private String orgCode;

    @Value("${apiService.pro.url}")
    private String proUrl;
    @Value("${apiService.pro.token}")
    private String proToken;



    @Value("${apiService.JJCSPF.url}")
    private String JJCSPFUrl;
    @Value("${apiService.JJCSPF.token}")
    private String JJCSPFToken;

    @Value("${apiService.GDCSPF.url}")
    private String GDCSPFUrl;
    @Value("${apiService.GDCSPF.token}")
    private String GDCSPFToken;

    @Value("${apiService.GDXXB.url}")
    private String GDXXBUrl;
    @Value("${apiService.GDXXB.token}")
    private String GDXXBToken;

    @Value("${apiService.GDZTB.url}")
    private String GDZTBUrl;
    @Value("${apiService.GDZTB.token}")
    private String GDZTBToken;

    @Value("${apiService.GHZJGL.url}")
    private String GHZJGLUrl;
    @Value("${apiService.GHZJGL.token}")
    private String GHZJGLToken;

    @Value("${apiService.JJAQGL.url}")
    private String JJAQGLUrl;
    @Value("${apiService.JJAQGL.token}")
    private String JJAQGLToken;

    @Value("${apiService.JJFBGL.url}")
    private String JJFBGLUrl;
    @Value("${apiService.JJFBGL.token}")
    private String JJFBGLToken;

    @Value("${apiService.JJZJGL.url}")
    private String JJZJGLUrl;
    @Value("${apiService.JJZJGL.token}")
    private String JJZJGLToken;

    @Value("${apiService.JJZLGL.url}")
    private String JJZLGLUrl;
    @Value("${apiService.JJZLGL.token}")
    private String JJZLGLToken;

    @Value("${apiService.JJBGGL.url}")
    private String JJBGGLUrl;
    @Value("${apiService.JJBGGL.token}")
    private String JJBGGLToken;

    @Value("${apiService.JJGZSJ.url}")
    private String JJGZSJUrl;
    @Value("${apiService.JJGZSJ.token}")
    private String JJGZSJToken;


    @Value("${apiService.GHSJBG.url}")
    private String GHSJBGUrl;
    @Value("${apiService.GHSJBG.token}")
    private String GHSJBGToken;

    @Value("${apiService.GDSGTSJPF.url}")
    private String GDSGTSJPFUrl;
    @Value("${apiService.GDSGTSJPF.token}")
    private String GDSGTSJPFToken;

    @Value("${apiService.GHZLGLB.url}")
    private String GHZLGLBUrl;
    @Value("${apiService.GHZLGLB.token}")
    private String GHZLGLBToken;

    @Value("${apiService.GHZLAQB.url}")
    private String GHZLAQBUrl;
    @Value("${apiService.GHZLAQB.token}")
    private String GHZLAQBToken;

    @Value("${apiService.GHGZSJ.url}")
    private String GHGZSJUrl;
    @Value("${apiService.GHGZSJ.token}")
    private String GHGZSJToken;

    @Value("${apiService.GHJLSX.url}")
    private String GHJLSXUrl;
    @Value("${apiService.GHJLSX.token}")
    private String GHJLSXToken;

    @Value("${apiService.GHJGYS.url}")
    private String GHJGYSUrl;
    @Value("${apiService.GHJGYS.token}")
    private String GHJGYSToken;

    @Value("${apiService.GHJUNGYS.url}")
    private String GHJUNGYSUrl;
    @Value("${apiService.GHJUNGYS.token}")
    private String GHJUNGYSToken;

    @Value("${apiService.GHFBGLB.url}")
    private String GHFBGLBUrl;
    @Value("${apiService.GHFBGLB.token}")
    private String GHFBGLBToken;

     @Value("${apiService.GHSGXK.url}")
    private String GHSGXKUrl;
    @Value("${apiService.GHSGXK.token}")
    private String GHSGXKToken;

    @Value("${apiService.GHZTBXX.url}")
    private String GHZTBXXUrl;
    @Value("${apiService.GHZTBXX.token}")
    private String GHZTBXXToken;

    @Value("${apiService.GHSGTSJ.url}")
    private String GHSGTSJUrl;
    @Value("${apiService.GHSGTSJ.token}")
    private String GHSGTSJToken;

    @Value("${apiService.QYJBXX.url}")
    private String QYJBXXUrl;
    @Value("${apiService.QYJBXX.token}")
    private String QYJBXXToken;

    @Value("${apiService.GHGKPF.url}")
    private String GHGKPFUrl;
    @Value("${apiService.GHGKPF.token}")
    private String GHGKPFToken;

    @Value("${apiService.GHSGXX.url}")
    private String GHSGXXUrl;
    @Value("${apiService.GHSGXX.token}")
    private String GHSGXXToken;

    @Value("${apiService.GHBDB.url}")
    private String GHBDBUrl;
    @Value("${apiService.GHBDB.token}")
    private String GHBDBToken;

    @Value("${apiService.GDGKPF.url}")
    private String GDGKPFUrl;
    @Value("${apiService.GDGKPF.token}")
    private String GDGKPFToken;

    @Value("${apiService.JJZTB.url}")
    private String JJZTBUrl;
    @Value("${apiService.JJZTB.token}")
    private String JJZTBToken;

    @Value("${apiService.GDGZSJ.url}")
    private String GDGZSJUrl;
    @Value("${apiService.GDGZSJ.token}")
    private String GDGZSJToken;


    @Value("${apiService.JJGKPF.url}")
    private String JJGKPFUrl;
    @Value("${apiService.JJGKPF.token}")
    private String JJGKPFToken;

    @Value("${apiService.GHCSPF.url}")
    private String GHCSPFUrl;
    @Value("${apiService.GHCSPF.token}")
    private String GHCSPFToken;

    @Value("${apiService.JJSGTPF.url}")
    private String JJSGTPFUrl;
    @Value("${apiService.JJSGTPF.token}")
    private String JJSGTPFToken;

    @Value("${apiService.GHXMB.url}")
    private String GHXMBUrl;
    @Value("${apiService.GHXMB.token}")
    private String GHXMBToken;

    @Value("${apiService.JJSGXX.url}")
    private String JJSGXXUrl;
    @Value("${apiService.JJSGXX.token}")
    private String JJSGXXToken;

    @Value("${apiService.ZTBHTB.url}")
    private String ZTBHTBUrl;
    @Value("${apiService.ZTBHTB.token}")
    private String ZTBHTBToken;

    @Value("${apiService.JJXMXX.url}")
    private String JJXMXXUrl;
    @Value("${apiService.JJXMXX.token}")
    private String JJXMXXToken;

    @Value("${apiService.JJSGTSJPF.url}")
    private String JJSGTSJPFUrl;
    @Value("${apiService.JJSGTSJPF.token}")
    private String JJSGTSJPFToken;

    @Value("${apiService.JJXMSGXK.url}")
    private String JJXMSGXKUrl;
    @Value("${apiService.JJXMSGXK.token}")
    private String JJXMSGXKToken;

    @Value("${apiService.JJXMSGXX.url}")
    private String JJXMSGXXUrl;
    @Value("${apiService.JJXMSGXX.token}")
    private String JJXMSGXXToken;

    @Value("${apiService.JJXMTZ.url}")
    private String JJXMTZUrl;
    @Value("${apiService.JJXMTZ.token}")
    private String JJXMTZToken;

    @Value("${apiService.JJBDXX.url}")
    private String JJBDXXUrl;
    @Value("${apiService.JJBDXX.token}")
    private String JJBDXXToken;

    @Value("${apiService.JJCSPFA.url}")
    private String JJCSPFAUrl;
    @Value("${apiService.JJCSPFA.token}")
    private String JJCSPFAToken;

    @Value("${apiService.JJGKPFA.url}")
    private String JJGKPFAUrl;
    @Value("${apiService.JJGKPFA.token}")
    private String JJGKPFAToken;

    @Value("${apiService.bdb.url}")
    private String bdbUrl;
    @Value("${apiService.bdb.token}")
    private String bdbToken;

    @Value("${apiService.zbjg.url}")
    private String zbjgUrl;
    @Value("${apiService.zbjg.token}")
    private String zbjgToken;

    @Value("${apiService.zbggbd.url}")
    private String zbggbdUrl;
    @Value("${apiService.zbggbd.token}")
    private String zbggbdToken;

    @Value("${apiService.tbbm.url}")
    private String tbbmUrl;
    @Value("${apiService.tbbm.token}")
    private String tbbmToken;

    @Value("${apiService.zbgg.url}")
    private String zbggUrl;
    @Value("${apiService.zbgg.token}")
    private String zbggToken;

    @Value("${apiService.xxpj.url}")
    private String xxpjUrl;
    @Value("${apiService.xxpj.token}")
    private String xxpjToken;

    @Value("${apiService.pszjz.url}")
    private String pszjzUrl;
    @Value("${apiService.pszjz.token}")
    private String pszjzToken;

    @Value("${apiService.zjb.url}")
    private String zjbUrl;
    @Value("${apiService.zjb.token}")
    private String zjbToken;

    @Value("${apiService.xmbdxx.url}")
    private String xmbdxxUrl;
    @Value("${apiService.xmbdxx.token}")
    private String xmbdxxToken;


    //以下是新增内容
    @Value("${apiService.ryjbxx.url}")
    private String ryjbxxUrl;
    @Value("${apiService.ryjbxx.token}")
    private String ryjbxxToken;

    @Value("${apiService.pbbf.url}")
    private String pbbfUrl;
    @Value("${apiService.pbbf.token}")
    private String pbbfToken;


    @Value("${apiService.zbpjgzba.url}")
    private String zbpjgzbaUrl;
    @Value("${apiService.zbpjgzba.token}")
    private String zbpjgzbaToken;

    @Value("${apiService.cbpsjg.url}")
    private String cbpsjgUrl;
    @Value("${apiService.cbpsjg.token}")
    private String cbpsjgToken;

    @Value("${apiService.xxpsx.url}")
    private String xxpsxUrl;
    @Value("${apiService.xxpsx.token}")
    private String xxpsxToken;

    @Value("${apiService.cbpsx.url}")
    private String cbpsxUrl;
    @Value("${apiService.cbpsx.token}")
    private String cbpsxToken;

    @Value("${apiService.zbwj.url}")
    private String zbwjUrl;
    @Value("${apiService.zbwj.token}")
    private String zbwjToken;

    @Value("${apiService.zbwjxgjl.url}")
    private String zbwjxgjlUrl;
    @Value("${apiService.zbwjxgjl.token}")
    private String zbwjxgjlToken;

    @Value("${apiService.zbhxr.url}")
    private String zbhxrUrl;
    @Value("${apiService.zbhxr.token}")
    private String zbhxrToken;

    @Value("${apiService.qyjbxx.url}")
    private String qyjbxxUrl;
    @Value("${apiService.qyjbxx.token}")
    private String qyjbxxToken;

    @Value("${apiService.gzgg.url}")
    private String gzggUrl;
    @Value("${apiService.gzgg.token}")
    private String gzggToken;
    @Value("${apiService.tbdwMac.url}")
    private String tbdwMacUrl;
    @Value("${apiService.tbdwMac.token}")
    private String tbdwMacToken;

    @Value("${apiService.tbdw.url}")
    private String tbdwUrl;
    @Value("${apiService.tbdw.token}")
    private String tbdwToken;

    @Value("${apiService.zzjg.url}")
    private String zzjglUrl;

    @Value("${apiService.zzjg.token}")
    private String zzjgToken;

    @Value("${apiService.SGTSJ.url}")
    private String SGTSJUrl;
    @Value("${apiService.SGTSJ.token}")
    private String SGTSJToken;

    @Value("${apiService.GKPF.url}")
    private String GKPFUrl;
    @Value("${apiService.GKPF.token}")
    private String GKPFToken;

    @Value("${apiService.org.url}")
    private String orgUrl;
    @Value("${apiService.org.token}")
    private String orgToken;

    @Value("${apiService.user.url}")
    private String userUrl;
    @Value("${apiService.user.token}")
    private String userToken;


    @Value("${apiService.ZBXX.url}")
    private String ZBXXUrl;
    @Value("${apiService.ZBXX.token}")
    private String ZBXXToken;

    @Value("${apiService.ZLGL.url}")
    private String ZLGLUrl;
    @Value("${apiService.ZLGL.token}")
    private String ZLGLToken;

    @Value("${apiService.TBXX.url}")
    private String TBXXUrl;
    @Value("${apiService.TBXX.token}")
    private String TBXXToken;

    @Value("${apiService.YDSQ.url}")
    private String YDSQUrl;
    @Value("${apiService.YDSQ.token}")
    private String YDSQToken;

    @Value("${apiService.GKZTSC.url}")
    private String GKZTSCUrl;
    @Value("${apiService.GKZTSC.token}")
    private String GKZTSCToken;

    @Value("${apiService.GDYSSQ.url}")
    private String GDYSSQUrl;
    @Value("${apiService.GDYSSQ.token}")
    private String GDYSSQToken;

    @Value("${apiService.XFJYS.url}")
    private String XFJYSUrl;
    @Value("${apiService.XFJYS.token}")
    private String XFJYSToken;

    @Value("${apiService.FBGL.url}")
    private String FBGLUrl;
    @Value("${apiService.FBGL.token}")
    private String FBGLToken;

    @Value("${apiService.GGSJ.url}")
    private String GGSJUrl;
    @Value("${apiService.GGSJ.token}")
    private String GGSJToken;

    @Value("${apiService.PSZJXX.url}")
    private String PSZJXXUrl;
    @Value("${apiService.PSZJXX.token}")
    private String PSZJXXToken;

    @Value("${apiService.JLSJ.url}")
    private String JLSJUrl;
    @Value("${apiService.JLSJ.token}")
    private String JLSJToken;

    @Value("${apiService.XMJYSZSHYRYXX.url}")
    private String XMJYSZSHYRYXXUrl;
    @Value("${apiService.XMJYSZSHYRYXX.token}")
    private String XMJYSZSHYRYXXToken;

    @Value("${apiService.XMJYSZSHY.url}")
    private String XMJYSZSHYUrl;
    @Value("${apiService.XMJYSZSHY.token}")
    private String XMJYSZSHYToken;

    @Value("${apiService.TBDWXX.url}")
    private String TBDWXXUrl;
    @Value("${apiService.TBDWXX.token}")
    private String TBDWXXToken;

    @Value("${apiService.ZSJGYS.url}")
    private String ZSJGYSUrl;
    @Value("${apiService.ZSJGYS.token}")
    private String ZSJGYSToken;

    @Value("${apiService.YSPSCHRYXX.url}")
    private String YSPSCHRYXXUrl;
    @Value("${apiService.YSPSCHRYXX.token}")
    private String YSPSCHRYXXToken;

    @Value("${apiService.CQSQ.url}")
    private String CQSQUrl;
    @Value("${apiService.CQSQ.token}")
    private String CQSQToken;

    @Value("${apiService.SGTSCHY.url}")
    private String SGTSCHYUrl;
    @Value("${apiService.SGTSCHY.token}")
    private String SGTSCHYToken;

    @Value("${apiService.PBJG.url}")
    private String PBJGUrl;
    @Value("${apiService.PBJG.token}")
    private String PBJGToken;

    @Value("${apiService.XMJYSNBYSHY.url}")
    private String XMJYSNBYSHYUrl;
    @Value("${apiService.XMJYSNBYSHY.token}")
    private String XMJYSNBYSHYToken;

    @Value("${apiService.ZSHYRYXX.url}")
    private String ZSHYRYXXUrl;
    @Value("${apiService.ZSHYRYXX.token}")
    private String ZSHYRYXXToken;

    @Value("${apiService.JGYSSQ.url}")
    private String JGYSSQUrl;
    @Value("${apiService.JGYSSQ.token}")
    private String JGYSSQToken;

    @Value("${apiService.GCKXXYJJC.url}")
    private String GCKXXYJJCUrl;
    @Value("${apiService.GCKXXYJJC.token}")
    private String GCKXXYJJCToken;

    @Value("${apiService.GKBZDWXX.url}")
    private String GKBZDWXXUrl;
    @Value("${apiService.GKBZDWXX.token}")
    private String GKBZDWXXToken;

    @Value("${apiService.JGYSPSCHYRXX.url}")
    private String JGYSPSCHYRXXUrl;
    @Value("${apiService.JGYSPSCHYRXX.token}")
    private String JGYSPSCHYRXXToken;

    @Value("${apiService.CSCS.url}")
    private String CSCSUrl;
    @Value("${apiService.CSCS.token}")
    private String CSCSToken;

    @Value("${apiService.GKZXDWXX.url}")
    private String GKZXDWXXUrl;
    @Value("${apiService.GKZXDWXX.token}")
    private String GKZXDWXXToken;

    @Value("${apiService.XMK.url}")
    private String XMKUrl;
    @Value("${apiService.XMK.token}")
    private String XMKToken;

    @Value("${apiService.JGYS.url}")
    private String JGYSUrl;
    @Value("${apiService.JGYS.token}")
    private String JGYSToken;

    @Value("${apiService.ZJBF.url}")
    private String ZJBFUrl;
    @Value("${apiService.ZJBF.token}")
    private String ZJBFToken;

    @Value("${apiService.CSBGGL.url}")
    private String CSBGGLUrl;
    @Value("${apiService.CSBGGL.token}")
    private String CSBGGLToken;

    @Value("${apiService.CSKCDW.url}")
    private String CSKCDWUrl;
    @Value("${apiService.CSKCDW.token}")
    private String CSKCDWToken;

    @Value("${apiService.SGTZXDW.url}")
    private String SGTZXDWUrl;
    @Value("${apiService.SGTZXDW.token}")
    private String SGTZXDWToken;

    @Value("${apiService.JGYSPSHY.url}")
    private String JGYSPSHYUrl;
    @Value("${apiService.JGYSPSHY.token}")
    private String JGYSPSHYToken;

    @Value("${apiService.CBSJ.url}")
    private String CBSJUrl;
    @Value("${apiService.CBSJ.token}")
    private String CBSJToken;

    @Value("${apiService.JGSJ.url}")
    private String JGSJUrl;
    @Value("${apiService.JGSJ.token}")
    private String JGSJToken;

    @Value("${apiService.ZDCQBGXY.url}")
    private String ZDCQBGXYUrl;
    @Value("${apiService.ZDCQBGXY.token}")
    private String ZDCQBGXYToken;

    @Value("${apiService.XMSGXX.url}")
    private String XMSGXXUrl;
    @Value("${apiService.XMSGXX.token}")
    private String XMSGXXToken;

    @Value("${apiService.YDZTSC.url}")
    private String YDZTSCUrl;
    @Value("${apiService.YDZTSC.token}")
    private String YDZTSCToken;

    @Value("${apiService.HTXX.url}")
    private String HTXXUrl;
    @Value("${apiService.HTXX.token}")
    private String HTXXToken;

    @Value("${apiService.SGTSJZS.url}")
    private String SGTSJZSUrl;
    @Value("${apiService.SGTSJZS.token}")
    private String SGTSJZSToken;

    @Value("${apiService.CSZSJCHYCYRY.url}")
    private String CSZSJCHYCYRYUrl;
    @Value("${apiService.CSZSJCHYCYRY.token}")
    private String CSZSJCHYCYRYToken;

    @Value("${apiService.JGYSPSHYB.url}")
    private String JGYSPSHYBUrl;
    @Value("${apiService.JGYSPSHYB.token}")
    private String JGYSPSHYBToken;

    @Value("${apiService.CSZTPS.url}")
    private String CSZTPSUrl;
    @Value("${apiService.CSZTPS.token}")
    private String CSZTPSToken;

    @Value("${apiService.PFJL.url}")
    private String PFJLUrl;
    @Value("${apiService.PFJL.token}")
    private String PFJLToken;


    @Value("${apiService.SGDWXXB.url}")
    private String SGDWXXBUrl;
    @Value("${apiService.SGDWXXB.token}")
    private String SGDWXXBToken;

    @Value("${apiService.QXZRQGL.url}")
    private String QXZRQGLUrl;
    @Value("${apiService.QXZRQGL.token}")
    private String QXZRQGLToken;

    @Value("${apiService.JDJHB.url}")
    private String JDJHBUrl;
    @Value("${apiService.JDJHB.token}")
    private String JDJHBToken;

    @Value("${apiService.CSSJDW.url}")
    private String CSSJDWUrl;
    @Value("${apiService.CSSJDW.token}")
    private String CSSJDWToken;

    @Value("${apiService.SJBGB.url}")
    private String SJBGBUrl;
    @Value("${apiService.SJBGB.token}")
    private String SJBGBToken;

    @Value("${apiService.AQGLB.url}")
    private String AQGLBUrl;
    @Value("${apiService.AQGLB.token}")
    private String AQGLBToken;

    @Value("${apiService.XMJYSZSJC.url}")
    private String XMJYSZSJCUrl;
    @Value("${apiService.XMJYSZSJC.token}")
    private String XMJYSZSJCToken;

    @Value("${apiService.SGTSJDW.url}")
    private String SGTSJDWUrl;
    @Value("${apiService.SGTSJDW.token}")
    private String SGTSJDWToken;

    @Value("${apiService.XMZBXX.url}")
    private String XMZBXXUrl;
    @Value("${apiService.XMZBXX.token}")
    private String XMZBXXToken;

    @Value("${apiService.RYGLB.url}")
    private String RYGLBUrl;
    @Value("${apiService.RYGLB.token}")
    private String RYGLBToken;

    @Value("${apiService.ZBXXB.url}")
    private String ZBXXBUrl;
    @Value("${apiService.ZBXXB.token}")
    private String ZBXXBToken;

    @Value("${apiService.CSZXDW.url}")
    private String CSZXDWUrl;
    @Value("${apiService.CSZXDW.token}")
    private String CSZXDWToken;

    @Value("${apiService.CQZJBF.url}")
    private String CQZJBFUrl;
    @Value("${apiService.CQZJBF.token}")
    private String CQZJBFToken;

    @Value("${apiService.CSZS.url}")
    private String CSZSUrl;
    @Value("${apiService.CSZS.token}")
    private String CSZSToken;


    @Value("${apiService.JGGXX.url}")
    private String JGGXXUrl;
    @Value("${apiService.JGGXX.token}")
    private String JGGXXToken;

    @Value("${apiService.SGTSJZSJCHYCYRY.url}")
    private String SGTSJZSJCHYCYRYUrl;
    @Value("${apiService.SGTSJZSJCHYCYRY.token}")
    private String SGTSJZSJCHYCYRYToken;

    @Value("${apiService.XMHPJ.url}")
    private String XMHPJUrl;
    @Value("${apiService.XMHPJ.token}")
    private String XMHPJToken;

    @Value("${apiService.GKZSJCHY.url}")
    private String GKZSJCHYUrl;
    @Value("${apiService.GKZSJCHY.token}")
    private String GKZSJCHYToken;

    @Value("${apiService.HBGL.url}")
    private String HBGLUrl;
    @Value("${apiService.HBGL.token}")
    private String HBGLToken;

    @Value("${apiService.WDGCXX.url}")
    private String WDGCXXUrl;
    @Value("${apiService.WDGCXX.token}")
    private String WDGCXXToken;

    @Value("${apiService.CQBGXY.url}")
    private String CQBGXYUrl;
    @Value("${apiService.CQBGXY.token}")
    private String CQBGXYToken;

    @Value("${apiService.ZDCQ.url}")
    private String ZDCQUrl;
    @Value("${apiService.ZDCQ.token}")
    private String ZDCQToken;


    @Value("${apiService.MXJBXX.url}")
    private String MXJBXXUrl;
    @Value("${apiService.MXJBXX.token}")
    private String MXJBXXToken;

    @Value("${apiService.JDSJ.url}")
    private String JDSJUrl;
    @Value("${apiService.JDSJ.token}")
    private String JDSJToken;

    @Value("${apiService.JJG.url}")
    private String JJGUrl;
    @Value("${apiService.JJG.token}")
    private String JJGToken;

    @Value("${apiService.GHZTB.url}")
    private String GHZTBUrl;
    @Value("${apiService.GHZTB.token}")
    private String GHZTBToken;

    @Value("${apiService.FJB.url}")
    private String FJBUrl;
    @Value("${apiService.FJB.token}")
    private String FJBToken;

    @Value("${apiService.PFZB3.url}")
    private String PFZB3Url;
    @Value("${apiService.PFZB3.token}")
    private String PFZB3Token;

    @Value("${apiService.GSZB2.url}")
    private String GSZB2Url;
    @Value("${apiService.GSZB2.token}")
    private String GSZB2Token;

    @Value("${apiService.PFZB1.url}")
    private String PFZB1Url;
    @Value("${apiService.PFZB1.token}")
    private String PFZB1Token;

    @Value("${apiService.PFZB2.url}")
    private String PFZB2Url;
    @Value("${apiService.PFZB2.token}")
    private String PFZB2Token;

    @Value("${apiService.GHFBGL.url}")
    private String GHFBGLUrl;
    @Value("${apiService.GHFBGL.token}")
    private String GHFBGLToken;

    @Value("${apiService.ZDB.url}")
    private String ZDBUrl;
    @Value("${apiService.ZDB.token}")
    private String ZDBToken;

    @Value("${apiService.GSZB1.url}")
    private String GSZB1Url;
    @Value("${apiService.GSZB1.token}")
    private String GSZB1Token;

    @Value("${apiService.SJBG.url}")
    private String SJBGUrl;
    @Value("${apiService.SJBG.token}")
    private String SJBGToken;

    @Value("${apiService.GKPFZB1.url}")
    private String GKPFZB1Url;
    @Value("${apiService.GKPFZB1.token}")
    private String GKPFZB1Token;

    @Value("${apiService.TJJH.url}")
    private String TJJHUrl;
    @Value("${apiService.TJJH.token}")
    private String TJJHToken;

    @Value("${apiService.XMB1.url}")
    private String XMB1Url;
    @Value("${apiService.XMB1.token}")
    private String XMB1Token;

    @Value("${apiService.SGTPFB.url}")
    private String SGTPFBUrl;
    @Value("${apiService.SGTPFB.token}")
    private String SGTPFBToken;

    @Value("${apiService.GSZB3.url}")
    private String GSZB3Url;
    @Value("${apiService.GSZB3.token}")
    private String GSZB3Token;
    @Value("${apiService.Y029_JLSXXX.url}")
    private String Y029_JLSXXXUrl;
    @Value("${apiService.Y029_JLSXXX.token}")
    private String Y029_JLSXXXToken;
    @Value("${apiService.Y029_SGXKB.url}")
    private String Y029_SGXKBUrl;
    @Value("${apiService.Y029_SGXKB.token}")
    private String Y029_SGXKBToken;
    @Value("${apiService.Y029_BGGLB.url}")
    private String Y029_BGGLBUrl;
    @Value("${apiService.Y029_BGGLB.token}")
    private String Y029_BGGLBToken;
    @Value("${apiService.Y029_NMGGZB.url}")
    private String Y029_NMGGZBUrl;
    @Value("${apiService.Y029_NMGGZB.token}")
    private String Y029_NMGGZBToken;


    @Resource
    private DataGatherMapper dataGatherMapper;

    @Resource
    private IZtbProjectService ztbProjectService;

    @Resource
    private IZtbParagraphService paragraphService;

    @Resource
    private IZtbBidwinshowService ztbBidwinshowService;

    @Resource
    private IZtbNoticeParagraphService ztbNoticeParagraphService;

    @Resource
    private IZtbTenderapplyService ztbTenderapplyService;

    @Resource
    private IZtbBiddingnoticeService ztbBiddingnoticeService;

    @Resource
    private IZtbTrialresultService ztbTrialresultService;

    @Resource
    private IZtbTrialexpertgroupService ztbTrialexpertgroupService;

    @Resource
    private IZtbExpertService ztbExpertService;

    @Resource
    private ICimsProjectSectionInfoService cimsProjectSectionInfoService;

    @Autowired
    private ISysUserDeptRelaService  sysUserDeptRelaService;

    @Resource
    private ICimsStaffBaseService cimsStaffBaseService;

    @Resource
    private IZtbTrialService trialService;

    @Resource
    private IZtbBiddingevafilehisService biddingevafilehisService;

    @Resource
    private IZtbQuacheckresultService quacheckresultService;

    @Resource
    private IZtbTrialgradeService trialgradeService;

    @Resource
    private IZtbQuacheckpolicyService quacheckpolicyService;

    @Resource
    private IZtbBiddingfileService biddingfileService;

    @Resource
    private IZtbBiddingfilechangehisService biddingfilechangehisService;

    @Resource
    private IZtbBiddingcandidateService biddingcandidateService;

    @Resource
    private ICimsEnterpriseBaseService enterpriseBaseService;

    @Resource
    private IZtbBiddingnoticeadditionalService biddingnoticeadditionalService;

    @Resource
    private IZtbTenderapplyprivatemessageService ztbTenderapplyprivatemessageService;
    @Resource
    private IViewRegCompanyService iViewRegCompanyService;

    @Resource
    private IY029SgtsjService iy029SgtsjService;

    @Resource
    private IY029ZhaobiaoxxService iy029ZhaobiaoxxService ;

    @Resource
    private  ICPreviousApproveGk1Service icPreviousApproveGk1Service;

    @Resource
    private ISysDeptService iSysDeptService;

    @Resource
    private IY029ZlglService iY029ZlglService;
    @Resource
    private IY029JlsxxxService iy029JlsxxxService;
    @Resource
    private IY029SgxkbService iY029SGXKBService;
    @Resource
    private IY029BgglbService iy029BgglbService;
    @Resource
    private IY029NmggzbService iy029NmggzbService;


    @Override
    public void API_Y029_NMGGZB() {
        doTask("农民工工资表","API_Y029_NMGGZB",Y029_NMGGZBUrl,Y029_NMGGZBToken,orgCode,500,500,null,null,iy029NmggzbService,Y029Nmggzb.class);

    }

    @Override
    public void API_Y029_BGGLB() {
        doTask("变更管理表","API_Y029_BGGLB",Y029_BGGLBUrl,Y029_BGGLBToken,orgCode,500,500,null,null,iy029BgglbService,Y029Bgglb.class);

    }

    @Override
    public void API_Y029_SGXKB() {
        doTask("施工许可表","API_Y029_SGXKB",Y029_SGXKBUrl,Y029_SGXKBToken,orgCode,500,500,null,null,iY029SGXKBService,Y029Sgxkb.class);
        try {
            String deleteSql = "DELETE FROM API_CONSTRUCTION_PERMIT WHERE PROJECT_NAME IN (SELECT XMMC FROM API_Y029_SGXKB)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_CONSTRUCTION_PERMIT (\n" +
                    "    PROJECT_NAME,               -- 项目名称（非空约束）\n" +
                    "    PROJECT_CODE,               -- 项目编号（非空约束）\n" +
                    "    CONSTRUCTION_APPROVAL_UNIT, -- 施工许可批复单位（非空约束）\n" +
                    "    CONSTRUCTION_PERMIT_FILE,   -- 施工许可证，索引地址（非空约束）\n" +
                    "    CONSTRUCTION_PERMIT_DATE,   -- 施工许可证时间，格式为YYYY-MM-DD（非空约束）\n" +
                    "    FILENAME                    -- 文件中文名\n" +
                    ")\n" +
                    "SELECT \n" +
                    "    XMMC,  -- 项目名称（?? 非空字段，需替换为实际值，否则插入失败）\n" +
                    "    XMBH,  -- 项目编号（?? 非空字段，需替换为实际值，否则插入失败）\n" +
                    "    SGXKPFDW,  -- 施工许可批复单位（?? 非空字段，需替换为实际值，否则插入失败）\n" +
                    "    SGXKZFWDZ,  -- 施工许可证，索引地址（?? 非空字段，需替换为实际值，否则插入失败）\n" +
                    "    SGXKZSJ,  -- 施工许可证时间，格式为YYYY-MM-DD（?? 非空DATE字段，需按格式赋值，示例：TO_DATE(a.许可时间, 'yyyy-mm-dd')）\n" +
                    "    SGXKZMC   -- 文件中文名\n" +
                    "-- 后续需自行替换为实际源表（如 FROM 你的源表名 WHERE 条件），当前用虚表示例\n" +
                    "FROM API_Y029_SGXKB\n";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Override
   //@Async("apiData")
    public void Y029_JLSXXX() {
        doTask("监理事项信息表","API_Y029_JLSXXX",Y029_JLSXXXUrl,Y029_JLSXXXToken,orgCode,500,500,null,null,iy029JlsxxxService,Y029Jlsxxx.class);
        try {
            String deleteSql = "DELETE FROM API_Supervision_Info WHERE PROJECTNAME IN (SELECT XMMC FROM API_Y029_JLSXXX)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_Supervision_Info (\n" +
                    "    Project_Number,               -- 项目编号\n" +
                    "    Bid_Section_Number,           -- 标段编号\n" +
                    "    Bid_Section_Name,             -- 标段名称\n" +
                    "    Supervision_Unit,             -- 监理单位\n" +
                    "    Supervision_Responsible_Person, -- 监理负责人\n" +
                    "    Supervision_Report,           -- 监理报告\n" +
                    "    PROJECTNAME,                  -- 项目名称\n" +
                    "    FILENAME                      -- 文件中文名\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMBH, -- 项目编号\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    JLDW, -- 监理单位\n" +
                    "    JLFZR, -- 监理负责人\n" +
                    "    JLBGFWDZ, -- 监理报告（文件名，另提供附件）\n" +
                    "    XMMC, -- 项目名称（VARCHAR2(50)，长度≤50位）\n" +
                    "    JLBGMC  -- 文件中文名（VARCHAR2(50)，长度≤50位）\n" +
                    "FROM API_Y029_JLSXXX;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }
    @Override
   //@Async("apiData")
    public void project() {
        doTask("项目信息表","API_ZTB_PROJECT",proUrl,proToken,orgCode,500,500,null,null,ztbProjectService,ZtbProject.class);
    }

    @Override
   //@Async("apiData")
    public void paragraph() {
        doTask("标段表","API_ZTB_PARAGRAPH",bdbUrl,bdbToken,orgCode,500,500,null,null,paragraphService,ZtbParagraph.class);
    }

    @Override
   //@Async("apiData")
    public void bidwinshow() {
        doTask("中标结果公告表","API_ZTB_BIDWINSHOW",zbjgUrl,zbjgToken,orgCode,500,500,null,null,ztbBidwinshowService,ZtbBidwinshow.class);
    }

    /**
     * 招标公告和标段匹配表采集
     * API_ZTB_NOTICE_PARAGRAPH招标公告和标段匹配表
     */
    @Override
   //@Async("apiData")
    public void noticeParagraph() {
        doTask("招标公告和标段匹配表","API_ZTB_NOTICE_PARAGRAPH",zbggbdUrl,zbggbdToken,orgCode,500,500,null,null,ztbNoticeParagraphService,ZtbNoticeParagraph.class);
    }
    /**
     * 投标报名表采集
     * API_ZTB_TENDERAPPLY投标报名表
     */
    @Override
   //@Async("apiData")
    public void tenderapply() {
        doTask("投标报名表","API_ZTB_TENDERAPPLY",tbbmUrl,tbbmToken,orgCode,500,500,null,null,ztbTenderapplyService,ZtbTenderapply.class);
    }

    /**
     * 招标公告表采集  截止调试 15708
     * API_ZTB_BIDDINGNOTICE招标公告表
     */
    @Override
   //@Async("apiData")
    public void biddingnotice() {
        doTask("招标公告表","API_ZTB_BIDDINGNOTICE",zbggUrl,zbggToken,orgCode,500,500,null,null,ztbBiddingnoticeService,ZtbBiddingnotice.class);
    }

    /**
     * 详细评审结果表采集 截止调试 488014
     * API_ZTB_TRIALRESULT详细评审结果表
     */
    @Override
   //@Async("apiData")
    public void trialresult() {
        doTask("详细评审结果表","API_ZTB_TRIALRESULT",xxpjUrl,xxpjToken,orgCode,500,500,null,null,ztbTrialresultService,ZtbTrialresult.class);
    }

    /**
     * 评审专家组表采集 截止采集 9387
     * API_ZTB_TRIALEXPERTGROUP评审专家组表
     */
    @Override
   //@Async("apiData")
    public void trialexpertgroup() {
        doTask("评审专家组表","API_ZTB_TRIALEXPERTGROUP",pszjzUrl,pszjzToken,orgCode,500,500,null,null,ztbTrialexpertgroupService,ZtbTrialexpertgroup.class);
    }

    /**
     * 专家表采集
     * API_ZTB_EXPERT专家表
     */
    @Override
   //@Async("apiData")
    public void expert() {
        doTask("专家表","API_ZTB_EXPERT",zjbUrl,zjbToken,orgCode,500,500,null,null,ztbExpertService,ZtbExpert.class);
    }

    /**
     * 项目标段信息表采集 截止采集 2827
     * API_CIMS_PROJECT_SECTION_INFO项目标段信息表
     */
    @Override
   //@Async("apiData")
    public void cimsprojectsectioninfo() {
        doTask("项目标段信息表","API_CIMS_PROJECT_SECTION_INFO",xmbdxxUrl,xmbdxxToken,orgCode,500,500,null,null,cimsProjectSectionInfoService,CimsProjectSectionInfo.class);
    }

    @Override
   //@Async("apiData")
    public void cimsstaffbase() {
        doTask("人员基本信息","API_CIMS_STAFF_BASE",ryjbxxUrl,ryjbxxToken,orgCode,500,500,null,null,cimsStaffBaseService,CimsStaffBase.class);
    }

    @Override
   //@Async("apiData")
    public void trial() {
        doTask("评标办法表","API_ZTB_TRIAL",pbbfUrl,pbbfToken,orgCode,500,500,null,null,trialService,ZtbTrial.class);
    }

    @Override
   //@Async("apiData")
    public void biddingevafilehis() {
//        ZTB_BIDDINGEVAFILEHIS 招标评标工作备案表
        doTask("招标评标工作备案表","API_ZTB_BIDDINGEVAFILEHIS",zbpjgzbaUrl,zbpjgzbaToken,orgCode,500,500,null,null,biddingevafilehisService,ZtbBiddingevafilehis.class);
    }

    @Override
   //@Async("apiData")
    public void quacheckresult() {
//#  ZTB_QUACHECKRESULT 初步评审结果表 ZtbQuacheckresult cbpsjg
        doTask("初步评审结果表","API_ZTB_QUACHECKRESULT",cbpsjgUrl,cbpsjgToken,orgCode,500,500,null,null,quacheckresultService,ZtbQuacheckresult.class);
    }

    @Override
   //@Async("apiData")
    public void trialgrade() {
//#  ZTB_TRIALGRADE 详细评审项表 xxpsx ZtbTrialgrade
        doTask("详细评审项表","API_ZTB_TRIALGRADE",xxpsxUrl,xxpsxToken,orgCode,500,500,null,null,trialgradeService,ZtbTrialgrade.class);
    }

    @Override
   //@Async("apiData")
    public void quacheckpolicy() {
//#  ZTB_QUACHECKPOLICY 初步评审项表 cbpsx:  ZtbQuacheckpolicy
        doTask("初步评审项表","API_ZTB_QUACHECKPOLICY",cbpsxUrl,cbpsxToken,orgCode,500,500,null,null,quacheckpolicyService,ZtbQuacheckpolicy.class);
    }

    @Override
   //@Async("apiData")
    public void biddingfile() {
//#  ZTB_BIDDINGFILE 招标文件表 zbwj: ZtbBiddingfile
        doTask("招标文件表","API_ZTB_BIDDINGFILE",zbwjUrl,zbwjToken,orgCode,500,500,null,null,biddingfileService,ZtbBiddingfile.class);
    }

    @Override
    public void biddingfilechangehis() {
//#  ZTB_BIDDINGFILECHANGEHIS 招标文件修改记录表 zbwjxgjl:  ZtbBiddingfilechangehis
        doTask("招标文件修改记录表","API_ZTB_BIDDINGFILECHANGEHIS",zbwjxgjlUrl,zbwjxgjlToken,orgCode,500,500,null,null,biddingfilechangehisService,ZtbBiddingfilechangehis.class);
    }

    @Override
   //@Async("apiData")
    public void biddingcandidate() {
//#  ZTB_BIDDINGCANDIDATE 中标候选人公告 zbhxr:  ZtbBiddingcandidate
        doTask("中标候选人公告","API_ZTB_BIDDINGCANDIDATE",zbhxrUrl,zbhxrToken,orgCode,500,500,null,null,biddingcandidateService,ZtbBiddingcandidate.class);
    }

    @Override
   //@Async("apiData")
    public void enterprisebase() {
//#  CIMS_ENTERPRISE_BASE 企业基本信息表 qyjbxx: CimsEnterpriseBase
        doTask("企业基本信息表","API_CIMS_ENTERPRISE_BASE",qyjbxxUrl,qyjbxxToken,orgCode,500,500,null,null,enterpriseBaseService,CimsEnterpriseBase.class);
    }

    @Override
   //@Async("apiData")
    public void biddingnoticeadditional() {
//#  ZTB_BIDDINGNOTICEADDITIONAL 更正公告表 gzgg:  ZtbBiddingnoticeadditional
        doTask("更正公告表","API_ZTB_BIDDINGNOTICEADDITIONAL",gzggUrl,gzggToken,orgCode,500,500,null,null,biddingnoticeadditionalService,ZtbBiddingnoticeadditional.class);
    }

    @Override
//   //@Async("apiData")
    public void tenderapplyprivatemessage() {
//#  投标单位mac信息表
        doTask("投标单位mac信息表","API_ZTB_TENDERAPPLYPRIVATEMESSAGE",tbdwMacUrl,tbdwMacToken,orgCode,500,500,null,null,ztbTenderapplyprivatemessageService,ZtbTenderapplyprivatemessage.class);
    }

    @Override
    //   //@Async("apiData")
    public void regcompany() {
        doTask("单位信息表","API_VIEW_REG_COMPANY",tbdwUrl,tbdwToken,orgCode,500,500,null,null,iViewRegCompanyService,ViewRegCompany.class);
    }

    @Override
    //   //@Async("apiData")
    public void zzjg() {
        doTask("账号机构表","API_SYS_USER_DEPT_RELA",zzjglUrl,zzjgToken,orgCode,500,500,null,null,sysUserDeptRelaService,SysUserDeptRela.class);
    }

    @Override
    //   //@Async("apiData")
    public void SGTSJ() {
        doTask("施工图设计表","API_Y029_SGTSJ",SGTSJUrl,SGTSJToken,orgCode,500,500,null,null,iy029SgtsjService,Y029Sgtsj.class);
    }

    @Override
    public void ZBXX() {
        doTask("招标信息","API_Y029_ZHAOBIAOXX",ZBXXUrl,ZBXXToken,orgCode,500,500,null,null,iy029ZhaobiaoxxService,Y029Zhaobiaoxx.class);
    }

    @Override
    public void ZLGL() {
        doTask("质量管理表","API_Y029_ZLGL",ZLGLUrl,ZLGLToken,orgCode,500,500,null,null,iY029ZlglService,Y029Zlgl.class);
        try {
            String deleteSql = "DELETE FROM API_QUALITY_MANAGEMENT WHERE PROJECT_NAME IN (SELECT XMMC FROM API_Y029_ZLGL)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_QUALITY_MANAGEMENT (\n" +
                    "    PROJECT_NAME,                -- 项目名称\n" +
                    "    PROJECT_CODE,                -- 项目编号\n" +
                    "    SECTION_NAME,                -- 标段名称\n" +
                    "    SECTION_CODE,                -- 标段编号\n" +
                    "    YEAR,                        -- 年份\n" +
                    "    INSPECTION_PLAN_FILE,        -- 年度检查计划(文件名 另提供附件)\n" +
                    "    INSPECTION_UNIT,             -- 检查单位（执法局、交建局治安处）\n" +
                    "    INSPECTION_LEADER,           -- 检查负责人\n" +
                    "    LEADER_CONTACT,              -- 负责人联系方式\n" +
                    "    INSPECTION_DATE,             -- 检查时间\n" +
                    "    ANNUAL_PROGRESS,             -- 年进度\n" +
                    "    INSPECTION_RECORD_FILE,      -- 检验记录文件（文件名 另提供附件）\n" +
                    "    HAS_PROBLEM,                 -- 是否存在问题\n" +
                    "    PROBLEM_DESCRIPTION,         -- 问题描述\n" +
                    "    RECTIFICATION_REQUIREMENT_FILE, -- 整改要求(文件名 另提供附件)\n" +
                    "    IS_RECTIFICATION_CONFIRMED,  -- 整改后是否确认\n" +
                    "    RECTIFICATION_REPORT_DATE,   -- 问题整改材料上报时间\n" +
                    "    RECTIFICATION_MATERIAL_FILE, -- 问题整改材料(文件名 另提供附件)\n" +
                    "    IS_PROBLEM_SOLVED,           -- 问题是否解决\n" +
                    "    YCLHGL,                       -- 原材料抽检合格率\n" +
                    "\tWTFILENAME,\n" +
                    "\tZGFILENAME\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC, -- 项目名称\n" +
                    "    XMBH, -- 项目编号\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    NULL, -- 年份（VARCHAR2(4)，后续填如'2024'）\n" +
                    "    NULL, -- 年度检查计划(文件名 另提供附件)\n" +
                    "    JCDW, -- 检查单位（执法局、交建局治安处）\n" +
                    "    JCFZR, -- 检查负责人\n" +
                    "    NULL, -- 负责人联系方式（VARCHAR2(20)，填手机号或固话）\n" +
                    "    JCSJ, -- 检查时间（格式如'2024-11-20'）\n" +
                    "    NULL, -- 年进度（如'85%'）\n" +
                    "    NULL, -- 检验记录文件（文件名 另提供附件）\n" +
                    "    SFCZWT, -- 是否存在问题（VARCHAR2(2)，建议填'是'/'否'）\n" +
                    "    WTMS, -- 问题描述（VARCHAR2(1000)，支持长文本）\n" +
                    "    NULL, -- 整改要求(文件名 另提供附件)\n" +
                    "    NULL, -- 整改后是否确认（如'已确认'/'未确认'）\n" +
                    "    NULL, -- 问题整改材料上报时间（格式如'2024-11-25'）\n" +
                    "    WTZGCL, -- 问题整改材料(文件名 另提供附件)\n" +
                    "    NULL, -- 问题是否解决（VARCHAR2(2)，建议填'是'/'否'）\n" +
                    "    NULL,  -- 原材料抽检合格率（如'98.5%'）\n" +
                    "\tNULL,\n" +
                    "\tNULL\n" +
                    "FROM API_Y029_ZLGL;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IY029TbxxService iY029TbxxService ;
    @Override
    public void TBXX() {
        doTask("投标信息","API_Y029_TBXX",TBXXUrl,TBXXToken,orgCode,500,500,null,null,iY029TbxxService,Y029Tbxx.class);
    }

    @Override
    public void GKPF() {
        doTask("工可批复子表1","API_C_PREVIOUS_APPROVE_GK1",GKPFUrl,GKPFToken,orgCode,500,500,null,null,icPreviousApproveGk1Service,CPreviousApproveGk1.class);
    }

    @Override
    public void ORG() {
        doTask("组织机构表","API_SYS_DEPT",orgUrl,orgToken,orgCode,500,500,null,null,iSysDeptService,SysDept.class);
    }

    @Resource
    private ISysUserServices iSysUserServices;

    @Override
    public void USER() {
        JSONObject jsonObject = new JSONObject();
        String userType = "1";
        jsonObject.put("value",userType);
        JSONObject object = new JSONObject();
        object.put("USER_TYPE",jsonObject);
//        JSONObject result = new JSONObject();
//        result.put("params",object);
        doTask("系统用户表","API_SYS_USER",userUrl,userToken,orgCode,500,500, object,null, iSysUserServices, SysUsers.class);
    }


//    ----------------------------------------

    @Resource
    private IY029YdsqService iY029YdsqService ;

    public void YDSQ() {
        doTask("用地申请","API_Y029_YDSQ",YDSQUrl,YDSQToken,orgCode,500,500,null,null,iY029YdsqService,Y029Ydsq.class);
    }

    @Resource
    private IY029GkztschyService  iY029GkztschyService ;

    public void GKZTSC() {
        doTask("工可专题审查会议","API_Y029_GKZTSCHY",GKZTSCUrl,GKZTSCToken,orgCode,500,500,null,null,iY029GkztschyService,Y029Gkztschy.class);
    }

    @Resource
    private IY029JgyssqService iY029JgyssqService ;

    public void GDYSSQ() {
        doTask("交工验收申请表","API_Y029_JGYSSQ",GDYSSQUrl,GDYSSQToken,orgCode,500,500,null,null,iY029JgyssqService,Y029Jgyssq.class);
    }

    @Resource
    private IY029XmjysjcxxService iY029XmjysjcxxService ;

    public void XFJYS() {
        doTask("项目建议书基础信息表","API_Y029_XMJYSJCXX",XFJYSUrl,XFJYSToken,orgCode,500,500,null,null,iY029XmjysjcxxService,Y029Xmjysjcxx.class);
    }

    @Resource
    private IY029FblwwbglService iY029FblwwbglService ;

    public void FBGL() {
        doTask("分包/劳务外包管理表","API_Y029_FBLWWBGL",FBGLUrl,FBGLToken,orgCode,500,500,null,null,iY029FblwwbglService,Y029Fblwwbgl.class);
        try {
            String deleteSql = "DELETE FROM API_SUBCONTRACT_MANAGEMENT WHERE PROJECT_NAME IN (SELECT XMMC FROM API_Y029_FBLWWBGL)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_SUBCONTRACT_MANAGEMENT (\n" +
                    "    PROJECT_NAME,                -- 项目名称\n" +
                    "    PROJECT_CODE,                -- 项目编号\n" +
                    "    SECTION_NAME,                -- 标段名称\n" +
                    "    SECTION_CODE,                -- 标段编号\n" +
                    "    CONTRACTOR,                  -- 承包单位\n" +
                    "    CONTRACT_TYPE,               -- 类型(分包/劳务外包)（仅允许这两个值）\n" +
                    "    SUBCONTRACT_PROJECT,         -- 分包/外包工程\n" +
                    "    SUBCONTRACT_COMPANY,         -- 分包/劳务外包单位\n" +
                    "    APPROVAL_MATERIAL,           -- 报批材料(文件名 另提供附件)\n" +
                    "    APPROVAL_FILE,               -- 批复文件(文件名 另提供附件)\n" +
                    "    APPROVAL_DATE,               -- 批复时间\n" +
                    "    CONTRACT_FILE,               -- 分包/外包合同(文件名 另提供附件)\n" +
                    "    CONTRACT_RECORD_FILE,        -- 合同备案(文件名 另提供附件)\n" +
                    "    CREATE_TIME,                 -- 创建时间\n" +
                    "    UPDATE_TIME,                 -- 更新时间\n" +
                    "    CONTRACT_RECORD_ID,          -- 分包/外包合同编号\n" +
                    "    ApprovalUnit,                -- 批复单位\n" +
                    "    SubcontractingUnitCode,      -- 分包单位代码\n" +
                    "    Subcontractor,               -- 分包单位\n" +
                    "    QualificationDocuments,      -- 分包单位资质文件\n" +
                    "    LegalPerson,                 -- 法人\n" +
                    "    LegalContactInformation,     -- 法人联系方式\n" +
                    "    SiteSupervisor,              -- 分包单位现场负责人\n" +
                    "    ContactInformation,           -- 分包单位现场负责人联系方式\n" +
                    "\tFILENAME,\n" +
                    "\tHTFILENAME\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC, -- 项目名称\n" +
                    "    XMBH, -- 项目编号\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    CBDW, -- 承包单位\n" +
                    "    LX, -- 类型(分包/劳务外包)（后续需填'分包'或'劳务外包'，否则违反CHECK约束）\n" +
                    "    FBWBGC, -- 分包/外包工程\n" +
                    "    FBLWWBDW, -- 分包/劳务外包单位\n" +
                    "    BPCL, -- 报批材料(文件名 另提供附件)\n" +
                    "    PFWJ, -- 批复文件(文件名 另提供附件)\n" +
                    "    PFSJ, -- 批复时间（DATE类型，后续填TO_DATE('2024-11-10','YYYY-MM-DD')）\n" +
                    "    FBHT, -- 分包/外包合同(文件名 另提供附件)\n" +
                    "    NULL, -- 合同备案(文件名 另提供附件)\n" +
                    "    NULL, -- 创建时间（DATE类型，后续填TO_DATE('2024-11-01','YYYY-MM-DD')）\n" +
                    "    NULL, -- 更新时间（DATE类型，后续填TO_DATE('2024-11-02','YYYY-MM-DD')）\n" +
                    "    NULL, -- 分包/外包合同编号\n" +
                    "    NULL, -- 批复单位\n" +
                    "    NULL, -- 分包单位代码\n" +
                    "    NULL, -- 分包单位\n" +
                    "    NULL, -- 分包单位资质文件\n" +
                    "    NULL, -- 法人\n" +
                    "    NULL, -- 法人联系方式\n" +
                    "    NULL, -- 分包单位现场负责人\n" +
                    "    NULL,  -- 分包单位现场负责人联系方式\n" +
                    "\tNULL,\n" +
                    "\tNULL\n" +
                    "FROM API_Y029_FBLWWBGL;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IY029JgsjService iY029JgsjService ;

    public void GGSJ() {
        doTask("交工审计表","API_Y029_JGSJ",GGSJUrl,GGSJToken,orgCode,500,500,null,null,iY029JgsjService,Y029Jgsj.class);
    }

    @Resource
    private IY029PbzjxxService iY029PbzjxxService ;

    public void PSZJXX() {
        doTask("评标专家信息","API_Y029_PBZJXX",PSZJXXUrl,PSZJXXToken,orgCode,500,500,null,null,iY029PbzjxxService,Y029Pbzjxx.class);
    }

    @Resource
    private IY029CldcjlsjService iY029CldcjlsjService ;

    public void JLSJ() {
        doTask("计量数据表","API_Y029_CLDCJLSJ",JLSJUrl,JLSJToken,orgCode,500,500,null,null,iY029CldcjlsjService,Y029Cldcjlsj.class);
    }

    @Resource
    private IY029XmjyszshycyryxxService iY029XmjyszshycyryxxService ;

    public void XMJYSZSHYRYXX() {
        doTask("项目建议书终审会议参与人员信息表","API_Y029_XMJYSZSHYCYRYXX",XMJYSZSHYRYXXUrl,XMJYSZSHYRYXXToken,orgCode,500,500,null,null,iY029XmjyszshycyryxxService,Y029Xmjyszshycyryxx.class);
    }

    @Resource
    private IY029XmjyszshyService iY029XmjyszshyService ;

    public void XMJYSZSHY() {
        doTask("项目建议书专审会议","API_Y029_XMJYSZSHY",XMJYSZSHYUrl,XMJYSZSHYToken,orgCode,500,500,null,null,iY029XmjyszshyService,Y029Xmjyszshy.class);
    }

    @Resource
    private IY029TbdwxxService iY029TbdwxxService ;

    public void TBDWXX() {
        doTask("投标单位信息","API_Y029_TBDWXX",TBDWXXUrl,TBDWXXToken,orgCode,500,500,null,null,iY029TbdwxxService,Y029Tbdwxx.class);
    }

    @Resource
    private IY029ZsjgysService iY029ZsjgysService ;

    public void ZSJGYS() {
        doTask("正式交工验收表","API_Y029_ZSJGYS",ZSJGYSUrl,ZSJGYSToken,orgCode,500,500,null,null,iY029ZsjgysService,Y029Zsjgys.class);
    }

    @Resource
    private IY029YspschryxxService iY029YspschryxxService;

    public void YSPSCHRYXX() {
        doTask("验收评审参会人员信息表","API_Y029_YSPSCHRYXX",YSPSCHRYXXUrl,YSPSCHRYXXToken,orgCode,500,500,null,null,iY029YspschryxxService,Y029Yspschryxx.class);
    }

    @Resource
    private IY029CqsqService iY029CqsqService;

    public void CQSQ() {
        doTask("拆迁申请","API_Y029_CQSQ",CQSQUrl,CQSQToken,orgCode,500,500,null,null,iY029CqsqService,Y029Cqsq.class);
    }

    @Resource
    private IY029SgtschyService iY029SgtschyService;

    public void SGTSCHY() {
        doTask("施工图审查会议","API_Y029_SGTSCHY",SGTSCHYUrl,SGTSCHYToken,orgCode,500,500,null,null,iY029SgtschyService,Y029Sgtschy.class);
    }

    @Resource IY029PbjgService iY029PbjgService;

    public void PBJG() {
        doTask("评标结果","API_Y029_PBJG",PBJGUrl,PBJGToken,orgCode,500,500,null,null,iY029PbjgService,Y029Pbjg.class);
    }

    @Resource IY029XmjysnbyshyService iY029XmjysnbyshyService;

    public void XMJYSNBYSHY() {
        doTask("项目建议书内部预审会议","API_Y029_XMJYSNBYSHY",XMJYSNBYSHYUrl,XMJYSNBYSHYToken,orgCode,500,500,null,null,iY029XmjysnbyshyService,Y029Xmjysnbyshy.class);
    }

    @Resource
    private IY029ZshyryxxService iy029ZshyryxxService;

    public void ZSHYRYXX() {
        doTask("终审会议人员信息表","API_Y029_ZSHYRYXX",ZSHYRYXXUrl,ZSHYRYXXToken,orgCode,500,500,null,null,iy029ZshyryxxService,Y029Zshyryxx.class);
    }

    @Resource
    private IY029JgyssqbService iy029JgyssqbService;

    public void JGYSSQ() {
        doTask("竣工验收申请表","API_Y029_JGYSSQB",JGYSSQUrl,JGYSSQToken,orgCode,500,500,null,null,iy029JgyssqbService,Y029Jgyssqb.class);
    }

    @Resource
    private IY029GckxxyjjcxxService iY029GckxxyjjcxxService;

    public void GCKXXYJJC() {
        doTask("工程可行性研究基础信息","API_Y029_GCKXXYJJCXX",GCKXXYJJCUrl,GCKXXYJJCToken,orgCode,500,500,null,null,iY029GckxxyjjcxxService,Y029Gckxxyjjcxx.class);
    }

    @Resource
    private IY029GkbzdwxxService iY029GkbzdwxxService;

    public void GKBZDWXX() {
        doTask("工可编制单位信息","API_Y029_GKBZDWXX",GKBZDWXXUrl,GKBZDWXXToken,orgCode,500,500,null,null,iY029GkbzdwxxService,Y029Gkbzdwxx.class);
    }

    @Resource
    private IY029JgyspschryxxService iy029JgyspschryxxService;

    public void JGYSPSCHYRXX() {
        doTask("竣工验收评审参会人员信息","API_Y029_JGYSPSCHRYXX",JGYSPSCHYRXXUrl,JGYSPSCHYRXXToken,orgCode,500,500,null,null,iy029JgyspschryxxService,Y029Jgyspschryxx.class);
    }

    @Resource
    private IY029CscsService iY029CscsService;

    public void CSCS() {
        doTask("初设初审","API_Y029_CSCS",CSCSUrl,CSCSToken,orgCode,500,500,null,null,iY029CscsService,Y029Cscs.class);
    }

    @Resource
    private IY029GkzxdwxxService iy029GkzxdwxxService;

    public void GKZXDWXX() {
        doTask("工可咨询单位信息","API_Y029_GKZXDWXX",GKZXDWXXUrl,GKZXDWXXToken,orgCode,500,500,null,null,iy029GkzxdwxxService,Y029Gkzxdwxx.class);
    }

    @Resource
    private IY029XmkService iY029XmkService;

    public void XMK() {
        doTask("项目库","API_Y029_XMK",XMKUrl,XMKToken,orgCode,500,500,null,null,iY029XmkService,Y029Xmk.class);
        try {
            String deleteSql = "DELETE FROM API_PROJECT_INFO WHERE PROTYPE = 'GD'";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);
            String insertSql = "INSERT INTO DIMENMODEL.API_PROJECT_INFO (\n" +
                    "    PROJECT_NAME,              -- 非空：项目名称（必填）\n" +
                    "    PROJECT_CODE,              -- 项目编号（VARCHAR2(36)）\n" +
                    "    CONSTRUCTION_UNIT,         -- 建设单位\n" +
                    "    MANAGEMENT_TYPE,           -- 管理类型\n" +
                    "    PROJECT_TYPE,              -- 项目类型（铁路/高速公路等）\n" +
                    "    CONSTRUCTION_STATUS,       -- 建设状态\n" +
                    "    TOTAL_INVESTMENT,          -- 总投资（亿，NUMBER(18,2)）\n" +
                    "    CONSTRUCTION_STANDARD,     -- 建设标准\n" +
                    "    PROJECT_SCALE,             -- 项目规模（公里，NUMBER(18,5)）\n" +
                    "    PROJECT_PROGRESS,          -- 项目进度(九大环节)\n" +
                    "    START_POINT,               -- 项目建设起点（经纬度）\n" +
                    "    END_POINT,                 -- 项目建设终点（经纬度）\n" +
                    "    IS_SECTIONED,              -- 项目是否分标段（如'Y'/'N'）\n" +
                    "    DESIGN_SPEED,              -- 设计时速（kmh）\n" +
                    "    CONSTRUCTION_PERIOD,       -- 建设周期\n" +
                    "    APPROVAL_DATE,             -- 立项日期（字符串格式，如'2024-01-01'）\n" +
                    "    START_DATE,                -- 开工日期（字符串格式）\n" +
                    "    PLAN_END_DATE,             -- 计划竣工日期（字符串格式）\n" +
                    "    PLAN_COMPLETION_DATE,      -- 计划完成时间（字符串格式）\n" +
                    "    IS_COMPLETED_OR_ADVANCED,  -- 项目是否完成或提前结束（如'Y'/'N'）\n" +
                    "    UNIT,                      -- 实施主体\n" +
                    "    BDNUMBER,                  -- 标段总数（NUMBER(22,2)）\n" +
                    "    YWCTZE,                    -- 已完成投资额（NUMBER(22,2)）\n" +
                    "    PROTYPE,                   -- 项目类型（区分单位）\n" +
                    "    SPTIME,                    -- 审批时间（DATETIME(0)类型）\n" +
                    "    SPEND                      -- 审批有效期（DATETIME(0)类型）\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC,  -- PROJECT_NAME：需补充（非空，如源表.项目名称字段）\n" +
                    "    NULL,  -- PROJECT_CODE：可补充项目编号（建议36位内）\n" +
                    "    NULL,  -- CONSTRUCTION_UNIT：可补充建设单位\n" +
                    "    NULL,  -- MANAGEMENT_TYPE：可补充管理类型\n" +
                    "    LXLB,  -- PROJECT_TYPE：可补充项目类型（匹配注释枚举值）\n" +
                    "    JSZT,  -- CONSTRUCTION_STATUS：可补充建设状态\n" +
                    "    ZTZ,  -- TOTAL_INVESTMENT：可补充总投资（数字，保留2位小数）\n" +
                    "    JSBZ,  -- CONSTRUCTION_STANDARD：可补充建设标准\n" +
                    "    ZLC,  -- PROJECT_SCALE：可补充项目规模（数字，保留5位小数）\n" +
                    "    XMJD,  -- PROJECT_PROGRESS：可补充项目进度（九大环节描述）\n" +
                    "    NULL,  -- START_POINT：可补充起点经纬度（如'116.40,39.90'）\n" +
                    "    NULL,  -- END_POINT：可补充终点经纬度\n" +
                    "    NULL,  -- IS_SECTIONED：可补充（'Y'分标段/'N'不分）\n" +
                    "    NULL,  -- DESIGN_SPEED：可补充设计时速（如'120'）\n" +
                    "    NULL,  -- CONSTRUCTION_PERIOD：可补充建设周期（如'2年'）\n" +
                    "    LXSJ,  -- APPROVAL_DATE：可补充立项日期（字符串格式）\n" +
                    "    KGRQ,  -- START_DATE：可补充开工日期（字符串格式）\n" +
                    "    JHJGRQ,  -- PLAN_END_DATE：可补充计划竣工日期（字符串格式）\n" +
                    "    JHWCSJ,  -- PLAN_COMPLETION_DATE：可补充计划完成时间（字符串格式）\n" +
                    "    NULL,  -- IS_COMPLETED_OR_ADVANCED：可补充（'Y'/'N'）\n" +
                    "    SSZT,  -- UNIT：可补充实施主体\n" +
                    "    NULL,  -- BDNUMBER：可补充标段总数（数字）\n" +
                    "    YWCTZ,  -- YWCTZE：可补充已完成投资额（数字）\n" +
                    "    'GD',  -- PROTYPE：可补充项目类型（区分单位）\n" +
                    "    NULL,  -- SPTIME：可补充审批时间（如TO_DATE(源表.审批时间, 'yyyy-mm-dd')）\n" +
                    "    NULL   -- SPEND：可补充审批有效期（如TO_DATE(源表.有效期, 'yyyy-mm-dd')）\n" +
                    "-- 替换为你的实际源表，后续自行补充字段映射\n" +
                    "FROM API_Y029_XMK where JHNF like '%2025%' and DISABLED = '0'";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IY029JgysService iY029JgysService;

    public void JGYS() {
        doTask("竣工验收表","API_Y029_JGYS",JGYSUrl,JGYSToken,orgCode,500,500,null,null,iY029JgysService,Y029Jgys.class);
    }

    @Resource
    private IY029ZjbfService iY029ZjbfService;

    public void ZJBF() {
        doTask("资金拨付表","API_Y029_ZJBF",ZJBFUrl,ZJBFToken,orgCode,500,500,null,null,iY029ZjbfService,Y029Zjbf.class);
    }

    @Resource
    private IY029CsbgglService iY029CsbgglService;

    public void CSBGGL() {
        doTask("初设变更管理","API_Y029_CSBGGL",CSBGGLUrl,CSBGGLToken,orgCode,500,500,null,null,iY029CsbgglService,Y029Csbggl.class);
    }

    @Resource
    private IY029CskcdwService iY029CskcdwService;

    public void CSKCDW() {
        doTask("初设勘察单位","API_Y029_CSKCDW",CSKCDWUrl,CSKCDWToken,orgCode,500,500,null,null,iY029CskcdwService,Y029Cskcdw.class);
    }

    @Resource
    private IY029SgtzxdwService iY029SgtzxdwService;

    public void SGTZXDW() {
        doTask("施工图咨询单位","API_Y029_SGTZXDW",SGTZXDWUrl,SGTZXDWToken,orgCode,500,500,null,null,iY029SgtzxdwService,Y029Sgtzxdw.class);
    }

    @Resource
    private IY029JgyspshybService iy029JgyspshybService;

    public void JGYSPSHY() {
        doTask("竣工验收评审会议表","API_Y029_JGYSPSHY",JGYSPSHYUrl,JGYSPSHYToken,orgCode,500,500,null,null,iy029JgyspshybService,Y029Jgyspshyb.class);
    }

    @Resource
    private IY029CbsjService iY029CbsjService;

    public void CBSJ() {
        doTask("初步设计表","API_Y029_CBSJ",CBSJUrl,CBSJToken,orgCode,500,500,null,null,iY029CbsjService,Y029Cbsj.class);
    }

    @Resource
    private IY029JgsjbService iy029JgsjbService;

    public void JGSJ() {
        doTask("竣工审计表","API_Y029_JGSJ",JGSJUrl,JGSJToken,orgCode,500,500,null,null,iy029JgsjbService,Y029Jgsjb.class);
    }

    @Resource
    private IY029ZdcqbgxyService iY029ZdcqbgxyService;

    public void ZDCQBGXY() {
        doTask("征地拆迁包干协议","API_Y029_ZDCQBGXY",ZDCQBGXYUrl,ZDCQBGXYToken,orgCode,500,500,null,null,iY029ZdcqbgxyService,Y029Zdcqbgxy.class);
    }

    @Resource
    private IY029XmsgxxService iY029XmsgxxService;

    public void XMSGXX() {
        doTask("项目施工信息表","API_Y029_XMSGXX",XMSGXXUrl,XMSGXXToken,orgCode,500,500,null,null,iY029XmsgxxService,Y029Xmsgxx.class);
        try {
            String deleteSql = "DELETE FROM API_PROJECT_CONSTRUCTION_INFO WHERE PROJECTNAME IN (SELECT XMMC FROM API_Y029_XMSGXX)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_PROJECT_CONSTRUCTION_INFO (\n" +
                    "    PROJECTCODE,                  -- 项目编号\n" +
                    "    PARAGRAPHNAME,                -- 标段名称\n" +
                    "    PARAGRAPHID,                  -- 标段编号\n" +
                    "    FZDANWEI,                     -- 负责单位（指挥部）\n" +
                    "    XMFUZEREN,                    -- 负责人\n" +
                    "    PERSONPHONE,                  -- 负责人联系方式\n" +
                    "    JGDANWEI,                     -- 监管单位\n" +
                    "    JLDANWEI,                     -- 监理单位\n" +
                    "    JLFUZEREN,                    -- 监理单位负责人\n" +
                    "    SGDANWEI,                     -- 施工单位\n" +
                    "    CONSTRUCTIONUNITCODE,         -- 施工单位代码\n" +
                    "    CONSTRUCTIONUNITPERSON,       -- 施工单位负责人\n" +
                    "    CONSTRUCTIONUNITPERSONCONTACT,-- 施工单位负责人联系方式\n" +
                    "    CONSTRUCTIONUNITLEADERIDCARD, -- 施工单位负责人身份证号\n" +
                    "    XGFILE,                       -- 质量报监等相关材料\n" +
                    "    CONSTRUCTIONSBFILE,           -- 施工许可申报材料\n" +
                    "    CONSTRUCTIONXKZ,              -- 施工许可证\n" +
                    "    KAIGONGSHIJIAN,               -- 开工时间\n" +
                    "    JIHUAJUNGONGRIQI,             -- 计划竣工日期\n" +
                    "    JIHUAWANCHENGSHIJIAN,         -- 计划完成时间\n" +
                    "    JIANSHEZHOUQI,                -- 建设周期\n" +
                    "    SHENPICAILIAO,                -- 审批材料（文件名 另提供附件）\n" +
                    "    SHIGONGHETONGWENJIAN,         -- 施工合同文件（文件名 另提供附件）\n" +
                    "    SHIGONGJINDU,                 -- 施工进度\n" +
                    "    ISSUBPACKAGE,                 -- 是否可以分包\n" +
                    "    Sectiontype,                  -- 标段类型\n" +
                    "    SectionConstruction,          -- 标段施工范围\n" +
                    "    ConstructionTime,             -- 施工许可申报时间\n" +
                    "    ConstructionpermitTime,       -- 施工许可证时间\n" +
                    "    SUPERVISION_SUPERVISOR,       -- 监理负责人\n" +
                    "    CONSTRUCTIONPERMIT,           -- 施工许可批复单位\n" +
                    "    temp_time,                    -- 临时时间字段\n" +
                    "    temp_kaigongshijian,          -- 临时开工时间\n" +
                    "    temp_jihuajungongriqi,        -- 临时计划竣工日期\n" +
                    "    temp_jihuawanChengshijian,    -- 临时计划完成时间\n" +
                    "    PROJECTNAME,                  -- 名称\n" +
                    "    totalProgress,                -- 精度\n" +
                    "    FILENAME                      -- 文件中文名\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMBH, -- 项目编号\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    FZDW, -- 负责单位（指挥部）\n" +
                    "    BDFZR, -- 负责人\n" +
                    "    NULL, -- 负责人联系方式\n" +
                    "    NULL, -- 监管单位\n" +
                    "    JLDW, -- 监理单位\n" +
                    "    JLFZR, -- 监理单位负责人\n" +
                    "    SGDW, -- 施工单位\n" +
                    "    NULL, -- 施工单位代码\n" +
                    "    SGDWFZR, -- 施工单位负责人\n" +
                    "    NULL, -- 施工单位负责人联系方式\n" +
                    "    NULL, -- 施工单位负责人身份证号\n" +
                    "    NULL, -- 质量报监等相关材料\n" +
                    "    NULL, -- 施工许可申报材料\n" +
                    "    NULL, -- 施工许可证\n" +
                    "    KGSJ, -- 开工时间\n" +
                    "    JGJGRQ, -- 计划竣工日期\n" +
                    "    JHWCSJ, -- 计划完成时间\n" +
                    "    JSZQ, -- 建设周期\n" +
                    "    NULL, -- 审批材料（文件名 另提供附件）\n" +
                    "    NULL, -- 施工合同文件（文件名 另提供附件）\n" +
                    "    NULL, -- 施工进度\n" +
                    "    NULL, -- 是否可以分包\n" +
                    "    NULL, -- 标段类型\n" +
                    "    NULL, -- 标段施工范围\n" +
                    "    NULL, -- 施工许可申报时间\n" +
                    "    NULL, -- 施工许可证时间\n" +
                    "    NULL, -- 监理负责人\n" +
                    "    NULL, -- 施工许可批复单位\n" +
                    "    NULL, -- 临时时间字段\n" +
                    "    NULL, -- 临时开工时间\n" +
                    "    NULL, -- 临时计划竣工日期\n" +
                    "    NULL, -- 临时计划完成时间\n" +
                    "    XMMC, -- 名称\n" +
                    "    NULL, -- 精度\n" +
                    "    NULL  -- 文件中文名\n" +
                    "FROM API_Y029_XMSGXX;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IY029YdztscService iY029YdztscService;

    public void YDZTSC() {
        doTask("用地专题审查","API_Y029_YDZTSC",YDZTSCUrl,YDZTSCToken,orgCode,500,500,null,null,iY029YdztscService,Y029Ydztsc.class);
    }

    @Resource
    private IY029HtxxService iY029HtxxService;

    public void HTXX() {
        doTask("合同信息","API_Y029_HTXX",HTXXUrl,HTXXToken,orgCode,500,500,null,null,iY029HtxxService,Y029Htxx.class);
    }

    @Resource
    private IY029SgtsjzsService iY029SgtsjzsService;

    public void SGTSJZS() {
        doTask("施工图设计终审","API_Y029_SGTSJZS",SGTSJZSUrl,SGTSJZSToken,orgCode,500,500,null,null,iY029SgtsjzsService,Y029Sgtsjzs.class);
    }

    @Resource
    private IY029JgyspshyService iY029JgyspshyService;

    public void JGYSPSHYB() {
        doTask("交工验收评审会议表","API_Y029_JGYSPSHYB",JGYSPSHYBUrl,JGYSPSHYBToken,orgCode,500,500,null,null,iY029JgyspshyService,Y029Jgyspshy.class);
    }

    @Resource
    private IY029PfjlService iY029PfjlService;

    public void PFJL() {
        doTask("评分记录","API_Y029_PFJL",PFJLUrl,PFJLToken,orgCode,500,500,null,null,iY029PfjlService,Y029Pfjl.class);
    }

    @Resource
    private IY029SgdwxxService iY029SgdwxxService;

    public void SGDWXXB() {
        doTask("施工单位信息表","API_Y029_SGDWXX",SGDWXXBUrl,SGDWXXBToken,orgCode,500,500,null,null,iY029SgdwxxService,Y029Sgdwxx.class);
    }

    @Resource
    private IY029QxzrqglService iY029QxzrqglService;

    public void QXZRQGL() {
        doTask("缺陷责任期管理表","API_Y029_QXZRQGL",QXZRQGLUrl,QXZRQGLToken,orgCode,500,500,null,null,iY029QxzrqglService,Y029Qxzrqgl.class);
    }

    @Resource
    private IY029JdjhService iY029JdjhService;

    public void JDJHB() {
        doTask("进度计划表","API_Y029_JDJH",JDJHBUrl,JDJHBToken,orgCode,500,500,null,null,iY029JdjhService,Y029Jdjh.class);
    }

    @Resource
    private IY029CssjdwService iY029CssjdwService;

    public void CSSJDW() {
        doTask("初设设计单位","API_Y029_CSSJDW",CSSJDWUrl,CSSJDWToken,orgCode,500,500,null,null,iY029CssjdwService,Y029Cssjdw.class);
    }

    @Resource
    private IY029SjbgService iY029SjbgbServicel;

    public void SJBGB() {
        doTask("设计变更表","API_Y029_SJBG",SJBGBUrl,SJBGBToken,orgCode,500,500,null,null,iY029SjbgbServicel,Y029Sjbg.class);
        try {
            String deleteSql = "DELETE FROM API_DESIGN_CHANGE_MANAGEMENT WHERE PROJECT_NAME IN (SELECT XMMC FROM API_Y029_SJBG)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_DESIGN_CHANGE_MANAGEMENT (\n" +
                    "    PROJECT_NAME,              -- 项目名称（非空，必须替换）\n" +
                    "    PROJECT_CODE,              -- 项目编号\n" +
                    "    SECTION_NAME,              -- 标段名称\n" +
                    "    SECTION_CODE,              -- 标段编号\n" +
                    "    APPLICANT_UNIT,            -- 申请变更单位\n" +
                    "    CHANGE_AMOUNT,             -- 设计变更金额(元)\n" +
                    "    CHANGE_CONTENT,            -- 设计变更内容\n" +
                    "    APPLICATION_FILE,          -- 设计变更报批文件(文件名 另提供附件)\n" +
                    "    APPLICATION_DATE,          -- 报批时间\n" +
                    "    APPROVAL_UNIT,             -- 批复单位\n" +
                    "    APPROVAL_DATE,             -- 批复时间\n" +
                    "    APPROVAL_FILE,             -- 批复文件(文件名 另提供附件)\n" +
                    "    HAS_EXPERT_REVIEW,         -- 是否进行专家论证\n" +
                    "    REVIEW_CONCLUSION_FILE,    -- 论证结论(文件名 另提供附件)\n" +
                    "    ChangeProcess,             -- 变更环节\n" +
                    "    ChangeType,                -- 变更类型\n" +
                    "    ApprovalTime,              -- 批复时间\n" +
                    "    ShowTime,                  -- 出示时间\n" +
                    "    FILENAME,                   -- 文件中文名\n" +
                    "    PROTYPE                   -- 文件中文名\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC, -- 项目名称（非空，必须替换为实际名称，如'XX桥梁改造项目'）\n" +
                    "    XMBH, -- 项目编号\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    SQDW, -- 申请变更单位\n" +
                    "    NULL, -- 设计变更金额(元)（NUMBER(15,2)，后续填如123456.78）\n" +
                    "    NULL, -- 设计变更内容\n" +
                    "    NULL, -- 设计变更报批文件(文件名 另提供附件)\n" +
                    "    NULL, -- 报批时间（格式如'2024-11-01'）\n" +
                    "    PFDW, -- 批复单位\n" +
                    "    PFSJ, -- 批复时间（格式如'2024-11-05'）\n" +
                    "    PFWJ, -- 批复文件(文件名 另提供附件)\n" +
                    "    NULL, -- 是否进行专家论证（VARCHAR(1)，填'Y'=是/'N'=否）\n" +
                    "    NULL, -- 论证结论(文件名 另提供附件)\n" +
                    "    NULL, -- 变更环节\n" +
                    "    NULL, -- 变更类型\n" +
                    "    NULL, -- 批复时间（格式如'2024-11-05'）\n" +
                    "    NULL, -- 出示时间（格式如'2024-11-06'）\n" +
                    "    NULL,  -- 文件中文名\n" +
                    "    'GD'  -- 区分单位\n" +
                    "FROM API_Y029_SJBG;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IY029XmjyszsjchService iY029XmjyszsjchService;

    public void XMJYSZSJC() {
        doTask("项目建议书终审决策会","API_Y029_XMJYSZSJCH",XMJYSZSJCUrl,XMJYSZSJCToken,orgCode,500,500,null,null,iY029XmjyszsjchService,Y029Xmjyszsjch.class);
    }

    @Resource
    private IY029SgtsjdwService iY029SgtsjdwService;

    public void SGTSJDW() {
        doTask("施工图设计单位","API_Y029_SGTSJDW",SGTSJDWUrl,SGTSJDWToken,orgCode,500,500,null,null,iY029SgtsjdwService,Y029Sgtsjdw.class);
    }

    @Resource
    private IY029BdxxService iY029BdxxService;

    public void XMZBXX() {
        doTask("项目招标信息","API_Y029_BDXX",XMZBXXUrl,XMZBXXToken,orgCode,500,500,null,null,iY029BdxxService,Y029Bdxx.class);
        try {
            String deleteSql = "DELETE FROM API_PROJECT_TENDER WHERE PROJECT_NAME IN (SELECT SSXMMC FROM API_Y029_BDXX)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_PROJECT_TENDER (\n" +
                    "    PROJECT_NAME,    -- 项目名称\n" +
                    "    TENDER_NAME,     -- 招标名称\n" +
                    "    TYPE,            -- 类型\n" +
                    "    CONTRACTING_UNIT,-- 承包单位\n" +
                    "    TENDER_CODE      -- 标段编号\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC,  -- 项目名称\n" +
                    "    BDMC,  -- 招标名称\n" +
                    "    BDLX,  -- 类型\n" +
                    "    ZBDW,  -- 承包单位\n" +
                    "    BDBH   -- 标段编号\n" +
                    "FROM API_Y029_BDXX;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IY029RyglbService iY029RyglbService;

    public void RYGLB() {
        doTask("人员管理表","API_Y029_RYGLB",RYGLBUrl,RYGLBToken,orgCode,500,500,null,null,iY029RyglbService,Y029Ryglb.class);
    }

    @Resource
    private IY029ZhongbiaoxxService iY029ZhongbiaoxxService;

    public void ZBXXB() {
        doTask("中标信息","API_Y029_ZHONGBIAOXX",ZBXXBUrl,ZBXXBToken,orgCode,500,500,null,null,iY029ZhongbiaoxxService,Y029Zhongbiaoxx.class);
    }

    @Resource
    private IY029CszxdwService iY029CszxdwService;

    public void CSZXDW() {
        doTask("初设咨询单位","API_Y029_CSZXDW",CSZXDWUrl,CSZXDWToken,orgCode,500,500,null,null,iY029CszxdwService,Y029Cszxdw.class);
    }

    @Resource
    private IY029CqzjbfService iY029CqzjbfService;

    public void CQZJBF() {
        doTask("拆迁资金拨付","API_Y029_CQZJBF",CQZJBFUrl,CQZJBFToken,orgCode,500,500,null,null,iY029CqzjbfService,Y029Cqzjbf.class);
    }

    @Resource
    private IY029CszsService iY029CszsService;

    public void CSZS() {
        doTask("初设终审","API_Y029_CSZS",CSZSUrl,CSZSToken,orgCode,500,500,null,null,iY029CszsService,Y029Cszs.class);
    }

    @Resource
    private IY029AqglService iY029AqglService;

    @Override
    public void AQGLB() {
        doTask("安全管理表","API_Y029_AQGL",AQGLBUrl,AQGLBToken,orgCode,500,500,null,null,iY029AqglService,Y029Aqgl.class);
        try {
            String deleteSql = "DELETE FROM API_SAFETY_MANAGEMENT WHERE PROJECT_NAME IN (SELECT XMMC FROM API_Y029_AQGL)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_SAFETY_MANAGEMENT (\n" +
                    "    PROJECT_NAME,                -- 项目名称（非空，必须替换）\n" +
                    "    PROJECT_CODE,                -- 项目编号\n" +
                    "    SECTION_NAME,                -- 标段名称\n" +
                    "    SECTION_CODE,                -- 标段编号\n" +
                    "    YEAR,                        -- 年份（非空，必须替换）\n" +
                    "    INSPECTION_PLAN,             -- 年度检查计划\n" +
                    "    INSPECTION_UNIT,             -- 检查单位(执法局、交建局治安处)\n" +
                    "    INSPECTION_LEADER,           -- 检查负责人\n" +
                    "    LEADER_CONTACT,              -- 负责人联系方式\n" +
                    "    INSPECTION_DATE,             -- 检查时间\n" +
                    "    ANNUAL_PROGRESS,             -- 年进度\n" +
                    "    INSPECTION_RECORD_FILE,      -- 检验记录文件\n" +
                    "    HAS_PROBLEM,                 -- 是否存在问题(是非空，必须替换)\n" +
                    "    PROBLEM_DESCRIPTION,         -- 问题描述\n" +
                    "    SAFETY_MANAGEMENT_INDEX,     -- 安全管理指数\n" +
                    "    RECTIFICATION_REQUIREMENT,   -- 整改要求(文件名 另提供附件)\n" +
                    "    IS_RECTIFICATION_CONFIRMED,  -- 整改后是否确认(是非空，必须替换)\n" +
                    "    RECTIFICATION_MATERIAL,      -- 问题整改材料\n" +
                    "    RECTIFICATION_REPORT_DATE,   -- 问题整改材料上报时间\n" +
                    "    IS_PROBLEM_SOLVED,            -- 问题是否解决(是非空，必须替换)\n" +
                    "\tMSFILENAME,\n" +
                    "\tZGFILENAME\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC, -- 项目名称（非空，必须替换为实际名称，如'XX隧道建设项目'）\n" +
                    "    XMBH, -- 项目编号\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    NULL, -- 年份（非空，必须替换为4位字符串，如'2024'）\n" +
                    "    NULL, -- 年度检查计划\n" +
                    "    JCDW, -- 检查单位(执法局、交建局治安处)\n" +
                    "    JCFZR, -- 检查负责人\n" +
                    "    NULL, -- 负责人联系方式（VARCHAR2(20)，填手机号或固话）\n" +
                    "    JCSJ, -- 检查时间（格式如'2024-12-05'）\n" +
                    "    NULL, -- 年进度（如'90%'）\n" +
                    "    NULL, -- 检验记录文件\n" +
                    "    SFCZWT, -- 是否存在问题(是非空，必须替换为'是'或'否'，VARCHAR2(1)需注意长度)\n" +
                    "    WTMS, -- 问题描述（VARCHAR2(1000)，支持长文本）\n" +
                    "    NULL, -- 安全管理指数（NUMBER(5,2)，如95.75）\n" +
                    "    NULL, -- 整改要求(文件名 另提供附件)\n" +
                    "    NULL, -- 整改后是否确认(是非空，必须替换，如'已确认'/'未确认')\n" +
                    "    WTZGCL, -- 问题整改材料\n" +
                    "    WTZGCLSBSJ, -- 问题整改材料上报时间（DATE类型，填TO_DATE('2024-12-10','YYYY-MM-DD')）\n" +
                    "    NULL,  -- 问题是否解决(是非空，必须替换为'已解决'/'未解决')\n" +
                    "\tNULL,\n" +
                    "\tNULL\n" +
                    "FROM API_Y029_AQGL;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IY029CsztpsService iY029CsztpsService;

    @Override
    public void CSZTPS() {
        doTask("初设专题评审","API_Y029_CSZTPS",CSZTPSUrl,CSZTPSToken,orgCode,500,500,null,null,iY029CsztpsService,Y029Csztps.class);
    }

    @Resource
    private IY029CszsjchycyryService iY029CszsjchycyryService;

    @Override
    public void CSZSJCHYCYRY() {
        doTask("初设终审决策会议参与人员","API_Y029_CSZSJCHYCYRY",CSZSJCHYCYRYUrl,CSZSJCHYCYRYToken,orgCode,500,500,null,null,iY029CszsjchycyryService,Y029Cszsjchycyry.class);
    }

    @Resource
    private IY029JggxxService iY029JggxxService;

    @Override
    public void JGGXX() {
        doTask("交竣工信息表","API_Y029_JGGXX",JGGXXUrl,JGGXXToken,orgCode,500,500,null,null,iY029JggxxService,Y029Jggxx.class);
    }

    @Resource
    private IY029SgtsjzsjchycyryService iY029SgtsjzsjchycyryService;

    @Override
    public void SGTSJZSJCHYCYRY() {
        doTask("施工图设计终审决策会议参与人员","API_Y029_SGTSJZSJCHYCYRY",SGTSJZSJCHYCYRYUrl,SGTSJZSJCHYCYRYToken,orgCode,500,500,null,null,iY029SgtsjzsjchycyryService,Y029Sgtsjzsjchycyry.class);
    }

    @Resource
    private IY029XmhpjService iY029XmhpjService;

    @Override
    public void XMHPJ() {
        doTask("项目后评价表","API_Y029_XMHPJ",XMHPJUrl,XMHPJToken,orgCode,500,500,null,null,iY029XmhpjService,Y029Xmhpj.class);
    }

    @Resource
    private IY029GkzsjchyService iY029GkzsjchyService;

    @Override
    public void GKZSJCHY() {
        doTask("工可终审决策会议","API_Y029_GKZSJCHY",GKZSJCHYUrl,GKZSJCHYToken,orgCode,500,500,null,null,iY029GkzsjchyService,Y029Gkzsjchy.class);
    }

    @Resource
    private IY029HbglService iY029HbglService;

    @Override
    public void HBGL() {
        doTask("环保管理表","API_Y029_HBGL",HBGLUrl,HBGLToken,orgCode,500,500,null,null,iY029HbglService,Y029Hbgl.class);
    }

    @Resource
    private IY029WdgcxxService iY029WdgcxxService;

    @Override
    public void WDGCXX() {
        doTask("危大工程信息表","API_Y029_WDGCXX",WDGCXXUrl,WDGCXXToken,orgCode,500,500,null,null,iY029WdgcxxService,Y029Wdgcxx.class);
    }

    @Resource
    private IY029CqbgxyService iy029CqbgxyService;

    @Override
    public void CQBGXY() {
        doTask("拆迁包干协议","API_Y029_CQBGXY",CQBGXYUrl,CQBGXYToken,orgCode,500,500,null,null,iy029CqbgxyService,Y029Cqbgxy.class);
    }

    @Resource
    private IY029ZdcqService iy029ZdcqService;

    @Override
    public void ZDCQ() {
        doTask("征地拆迁表","API_Y029_ZDCQ",ZDCQUrl,ZDCQToken,orgCode,500,500,null,null,iy029ZdcqService,Y029Zdcq.class);
    }

    @Resource
    private ICPreviousApproveCbsj3Service icPreviousApproveCbsj3Service;

    @Override
    public void PFZB3() {
        doTask("初步设计批复子表3","API_C_PREVIOUS_APPROVE_CBSJ3",PFZB3Url,PFZB3Token,orgCode,500,500,null,null,icPreviousApproveCbsj3Service,CPreviousApproveCbsj3.class);
    }
    @Resource
    private ICPreviousApproveT2Service icPreviousApproveT2Service;

    @Override
    public void GSZB2() {
        doTask("初步设计批复工程概算子表2","API_C_PREVIOUS_APPROVE_T2",GSZB2Url,GSZB2Token,orgCode,500,500,null,null,icPreviousApproveT2Service,CPreviousApproveT2.class);
    }

    @Resource
    private ICPreviousApproveCbsj1Service iPreviousApproveCbsj1Service;

    @Override
    public void PFZB1() {
        doTask("初步设计批复子表1","API_C_PREVIOUS_APPROVE_CBSJ1",PFZB1Url,PFZB1Token,orgCode,500,500,null,null,iPreviousApproveCbsj1Service,CPreviousApproveCbsj1.class);
    }

    @Resource
    private ICPreviousApproveCbsj2Service iPreviousApproveCbsj2Service;

    @Override
    public void PFZB2() {
        doTask("初步设计批复子表2","API_C_PREVIOUS_APPROVE_CBSJ2",PFZB2Url,PFZB2Token,orgCode,500,500,null,null,iPreviousApproveCbsj2Service,CPreviousApproveCbsj2.class);
    }

    @Resource
    private ICBuildFbglService iBuildFbglService;

    @Override
    public void GHFBGL() {
        doTask("分包管理","API_C_BUILD_FBGL",GHFBGLUrl,GHFBGLToken,orgCode,500,500,null,null,iBuildFbglService,CBuildFbgl.class);
    }

    @Resource
    private ICSysDictService iSysDictService;

    @Override
    public void ZDB() {
        doTask("字典表","API_C_SYS_DICT",ZDBUrl,ZDBToken,orgCode,500,500,null,null,iSysDictService,CSysDict.class);
    }

    @Resource
    private ICPreviousApproveT1Service iPreviousApproveT1Service;

    @Override
    public void GSZB1() {
        doTask("初步设计批复工程概算子表1","API_C_PREVIOUS_APPROVE_T1",GSZB1Url,GSZB1Token,orgCode,500,500,null,null,iPreviousApproveT1Service,CPreviousApproveT1.class);
    }

    @Resource
    private ICBuildDesignChangeService iBuildDesignChangeService;

    @Override
    public void SJBG() {
        doTask("设计变更","API_C_BUILD_DESIGN_CHANGE",SJBGUrl,SJBGToken,orgCode,500,500,null,null,iBuildDesignChangeService,CBuildDesignChange.class);
        try {
            String deleteSql = "DELETE FROM API_DESIGN_CHANGE_MANAGEMENT WHERE PROJECT_NAME IN (SELECT PROJECT_NAME FROM API_C_BUILD_DESIGN_CHANGE)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_DESIGN_CHANGE_MANAGEMENT (\n" +
                    "    PROJECT_NAME,              -- 项目名称（非空，必须替换）\n" +
                    "    PROJECT_CODE,              -- 项目编号\n" +
                    "    SECTION_NAME,              -- 标段名称\n" +
                    "    SECTION_CODE,              -- 标段编号\n" +
                    "    APPLICANT_UNIT,            -- 申请变更单位\n" +
                    "    CHANGE_AMOUNT,             -- 设计变更金额(元)\n" +
                    "    CHANGE_CONTENT,            -- 设计变更内容\n" +
                    "    APPLICATION_FILE,          -- 设计变更报批文件(文件名 另提供附件)\n" +
                    "    APPLICATION_DATE,          -- 报批时间\n" +
                    "    APPROVAL_UNIT,             -- 批复单位\n" +
                    "    APPROVAL_DATE,             -- 批复时间\n" +
                    "    APPROVAL_FILE,             -- 批复文件(文件名 另提供附件)\n" +
                    "    HAS_EXPERT_REVIEW,         -- 是否进行专家论证\n" +
                    "    REVIEW_CONCLUSION_FILE,    -- 论证结论(文件名 另提供附件)\n" +
                    "    ChangeProcess,             -- 变更环节\n" +
                    "    ChangeType,                -- 变更类型\n" +
                    "    ApprovalTime,              -- 批复时间\n" +
                    "    ShowTime,                  -- 出示时间\n" +
                    "    FILENAME                   -- 文件中文名\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC, -- 项目名称（非空，必须替换为实际名称，如'XX桥梁改造项目'）\n" +
                    "    XMBH, -- 项目编号\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    SQDW, -- 申请变更单位\n" +
                    "    NULL, -- 设计变更金额(元)（NUMBER(15,2)，后续填如123456.78）\n" +
                    "    NULL, -- 设计变更内容\n" +
                    "    NULL, -- 设计变更报批文件(文件名 另提供附件)\n" +
                    "    NULL, -- 报批时间（格式如'2024-11-01'）\n" +
                    "    PFDW, -- 批复单位\n" +
                    "    PFSJ, -- 批复时间（格式如'2024-11-05'）\n" +
                    "    PFWJ, -- 批复文件(文件名 另提供附件)\n" +
                    "    NULL, -- 是否进行专家论证（VARCHAR(1)，填'Y'=是/'N'=否）\n" +
                    "    NULL, -- 论证结论(文件名 另提供附件)\n" +
                    "    NULL, -- 变更环节\n" +
                    "    NULL, -- 变更类型\n" +
                    "    NULL, -- 批复时间（格式如'2024-11-05'）\n" +
                    "    NULL, -- 出示时间（格式如'2024-11-06'）\n" +
                    "    NULL  -- 文件中文名\n" +
                    "FROM API_Y029_SJBG;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private ICPreviousApproveGk1Service iPreviousApproveGk1Service;

    @Override
    public void GKPFZB1() {
        doTask("工可批复子表1","API_C_PREVIOUS_APPROVE_GK1",GKPFZB1Url,GKPFZB1Token,orgCode,500,500,null,null,iPreviousApproveGk1Service,CPreviousApproveGk1.class);
    }

    @Resource
    private ICPreviousPlanService iPreviousPlanService;

    @Override
    public void TJJH() {
        doTask("项目推进计划","API_C_PREVIOUS_PLAN",TJJHUrl,TJJHToken,orgCode,500,500,null,null,iPreviousPlanService,CPreviousPlan.class);
    }

    @Resource
    private ICProjectExtendInfoService iProjectExtendInfoService;

    @Override
    public void XMB1() {
        doTask("项目表","API_C_PROJECT_EXTEND_INFO",XMB1Url,XMB1Token,orgCode,500,500,null,null,iProjectExtendInfoService,CProjectExtendInfo.class);
    }

    @Resource
    private ICPreviousApproveService iPreviousApproveService;

    @Override
    public void SGTPFB() {
        doTask("工可批复初步设计批复施工图批复表","API_C_PREVIOUS_APPROVE",SGTPFBUrl,SGTPFBToken,orgCode,500,500,null,null,iPreviousApproveService,CPreviousApprove.class);
    }

    @Resource
    private ICPreviousApproveT3Service icPreviousApproveT3Service;

    @Override
    public void GSZB3() {
        doTask("初步设计批复工程概算子表3","API_C_PREVIOUS_APPROVE_T3",GSZB3Url,GSZB3Token,orgCode,500,500,null,null,icPreviousApproveT3Service,CPreviousApproveT3.class);
    }

    @Resource
    private IViewProjectService iViewProjectService;

    @Override
    public void MXJBXX() {
        doTask("项目基本信息","API_VIEW_PROJECT",MXJBXXUrl,MXJBXXToken,orgCode,500,500,null,null,iViewProjectService,ViewProject.class);
    }

    @Resource
    private IViewProjectInvestmentService iViewProjectInvestmentService;

    @Override
    public void JDSJ() {
        doTask("进度数据","API_VIEW_PROJECT_INVESTMENT",JDSJUrl,JDSJToken,orgCode,500,500,null,null,iViewProjectInvestmentService,ViewProjectInvestment.class);
    }

    @Resource
    private ICFileService iFileService;

    @Override
    public void FJB() {
        doTask("附件表","API_C_FILE",FJBUrl,FJBToken,orgCode,500,500,null,null,iFileService,CFile.class);
    }

    @Resource
    private ICEndCheckAcceptService iEndCheckAcceptService;

    @Override
    public void JJG() {
        doTask("交竣工验收表","API_C_END_CHECK_ACCEPT",JJGUrl,JJGToken,orgCode,500,500,null,null,iEndCheckAcceptService,CEndCheckAccept.class);
    }

    @Resource
    private ICPreviousBidService iPreviousBidService;

    @Override
    public void GHZTB() {
        doTask("招投标表","API_C_PREVIOUS_BID",GHZTBUrl,GHZTBToken,orgCode,500,500,null,null,iPreviousBidService,CPreviousBid.class);
    }

    @Resource
    private IViewPreliminaryDesignService iViewPreliminaryDesignService;

    @Override
    public void JJCSPF() {
        doTask("初设批复","API_VIEW_PRELIMINARY_DESIGN",JJCSPFUrl,JJCSPFToken,orgCode,500,500,null,null,iViewPreliminaryDesignService,ViewPreliminaryDesign.class);
    }

    @Resource
    private IViewFeasibilityStudyInfoService iViewFeasibilityStudyInfoService;

    @Override
    public void JJGKPF() {
        doTask("工可批复信息","API_VIEW_FEASIBILITY_STUDY_INFO",JJGKPFUrl,JJGKPFToken,orgCode,500,500,null,null,iViewFeasibilityStudyInfoService,ViewFeasibilityStudyInfo.class);
    }

    @Resource
    private IViewConstructionDrawDesignService iViewConstructionDrawDesignService;

    @Override
    public void JJSGTPF() {
        doTask("施工图设计批复","API_VIEW_CONSTRUCTION_DRAW_DESIGN",JJSGTPFUrl,JJSGTPFToken,orgCode,500,500,null,null,iViewConstructionDrawDesignService,ViewConstructionDrawDesign.class);
    }

    @Resource
    private IViewProjectConstructionInfoService iViewProjectConstructionInfoService;

    @Override
    public void JJSGXX() {
        doTask("项目施工信息","API_VIEW_PROJECT_CONSTRUCTION_INFO",JJSGXXUrl,JJSGXXToken,orgCode,500,500,null,null,iViewProjectConstructionInfoService,ViewProjectConstructionInfo.class);
    }

    @Resource
    private IAViewProjectService iAViewProjectService;

    @Override
    @Transactional
    public void JJXMXX() {
        doTask("项目信息","API_A_VIEW_PROJECT",JJXMXXUrl,JJXMXXToken,orgCode,500,500,null,null,iAViewProjectService,AViewProject.class);
        try {
            String deleteSql = "DELETE FROM API_PROJECT_INFO WHERE PROTYPE = 'JJ'";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_PROJECT_INFO (\n" +
                    "    PROJECT_NAME,               -- 项目名称（非空，需替换为实际值）\n" +
                    "    PROJECT_CODE,               -- 项目编号\n" +
                    "    CONSTRUCTION_UNIT,          -- 建设单位\n" +
                    "    MANAGEMENT_TYPE,            -- 管理类型\n" +
                    "    PROJECT_TYPE,               -- 项目类型（铁路、高速公路、国道、干线航道、水运）\n" +
                    "    CONSTRUCTION_STATUS,        -- 建设状态\n" +
                    "    TOTAL_INVESTMENT,           -- 总投资（亿）\n" +
                    "    CONSTRUCTION_STANDARD,      -- 建设标准\n" +
                    "    PROJECT_SCALE,              -- 项目规模（公里）\n" +
                    "    PROJECT_PROGRESS,           -- 项目进度(九大环节)\n" +
                    "    START_POINT,                -- 项目建设起点（经纬度）\n" +
                    "    END_POINT,                  -- 项目建设终点（经纬度）\n" +
                    "    IS_SECTIONED,               -- 项目是否分标段\n" +
                    "    DESIGN_SPEED,               -- 设计时速（kmh）\n" +
                    "    CONSTRUCTION_PERIOD,        -- 建设周期\n" +
                    "    APPROVAL_DATE,              -- 立项日期\n" +
                    "    START_DATE,                 -- 开工日期\n" +
                    "    PLAN_END_DATE,              -- 计划竣工日期\n" +
                    "    PLAN_COMPLETION_DATE,       -- 计划完成时间\n" +
                    "    IS_COMPLETED_OR_ADVANCED,   -- 项目是否完成或提前结束\n" +
                    "    UNIT,                       -- 实施主体\n" +
                    "    BDNUMBER,                   -- 标段总数\n" +
                    "    YWCTZE,                     -- 已完成投资额\n" +
                    "    PROTYPE,                    -- 项目类型（区分单位）\n" +
                    "    SPTIME,                     -- 审批时间\n" +
                    "    SPEND                       -- 审批有效期\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    PROJECT_NAME,  -- 项目名称（非空字段，直接用NULL会报错，需替换为实际值）\n" +
                    "    PROJECT_NUMBER,  -- 项目编号\n" +
                    "    BUILD_DEPT,  -- 建设单位\n" +
                    "    MANAGE_TYPE,  -- 管理类型\n" +
                    "    PROJECT_TYPE,  -- 项目类型\n" +
                    "    CONSTRUCTION_STATUS,  -- 建设状态\n" +
                    "    INVESTMENT,  -- 总投资（亿）\n" +
                    "    CONSTRUCTION_STANDARD,  -- 建设标准\n" +
                    "    MILEAGE,  -- 项目规模（公里）\n" +
                    "    PROJECT_PROGRESS,  -- 项目进度(九大环节)\n" +
                    "    NULL,  -- 项目建设起点（经纬度）\n" +
                    "    NULL,  -- 项目建设终点（经纬度）\n" +
                    "    NULL,  -- 项目是否分标段\n" +
                    "    NULL,  -- 设计时速（kmh）\n" +
                    "    CONSTRUCTION_CYCLE,  -- 建设周期\n" +
                    "    PROJECT_APPROVAL_DATE,  -- 立项日期\n" +
                    "    START_WORK_DATE,  -- 开工日期\n" +
                    "    PLAN_COMPLETION_DATE,  -- 计划竣工日期\n" +
                    "    PLAN_ACCOMPLISH_DATE,  -- 计划完成时间\n" +
                    "    NULL,  -- 项目是否完成或提前结束\n" +
                    "    RESPONSIBLE_PERSON,  -- 实施主体\n" +
                    "    TENDER_NUM,  -- 标段总数\n" +
                    "    PROJECT_FINISH_INVESTMENT,  -- 已完成投资额\n" +
                    "    'JJ',  -- 项目类型（区分单位）\n" +
                    "    NULL,  -- 审批时间\n" +
                    "    NULL   -- 审批有效期\n" +
                    "FROM API_A_VIEW_PROJECT";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IAViewSgtsjpfService iAViewSgtsjpfService;

    @Override
    public void JJSGTSJPF() {
        doTask("施工图设计批复","API_A_VIEW_SGTSJPF",JJSGTSJPFUrl,JJSGTSJPFToken,orgCode,500,500,null,null,iAViewSgtsjpfService,AViewSgtsjpf.class);
        try {
            String deleteSql = "DELETE FROM API_CONSTRUCTION_DRAWING_DESIGN WHERE projectname in (select PROJECT_NAME from API_A_VIEW_SGTSJPF)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_CONSTRUCTION_DRAWING_DESIGN (\n" +
                    "    PROJECTNAME,                -- 项目名称\n" +
                    "    PROJECTCODE,                -- 项目编号\n" +
                    "    PARAGRAPHNAME,              -- 标段名称\n" +
                    "    PARAGRAPHNUMBER,            -- 标段号\n" +
                    "    DESIGN_DEPT_HEAD,           -- 设计管理部门负责人\n" +
                    "    DESIGN_DEPARTMENT,          -- 设计管理部门\n" +
                    "    HEAD_CONTACT,               -- 负责人联系方式\n" +
                    "    HEAD_IDCARD,                -- 负责人身份证号\n" +
                    "    DESIGNUNIT,                 -- 设计单位\n" +
                    "    DESIGN_HEAD,                -- 设计负责人\n" +
                    "    DESIGN_HEAD_CONTACT,        -- 设计负责人联系方式\n" +
                    "    DESIGN_HEAD_IDCARD,         -- 设计负责人身份证号\n" +
                    "    CONSULTINGUNIT,             -- 咨询单位\n" +
                    "    CONSULTING_HEAD,            -- 咨询负责人\n" +
                    "    CONSULTING_HEAD_CONTACT,    -- 咨询负责人联系方式\n" +
                    "    CONSULTING_HEAD_IDCARD,     -- 咨询负责人身份证号\n" +
                    "    SURVEY_CONTENT,             -- 勘察内容 (关键内容)\n" +
                    "    SURVEY_DESIGN_FILE,         -- 勘察设计文件 (文件名 另提供附件)\n" +
                    "    CONSTRUCTION_DRAWING_PLAN,  -- 施工图设计方案 (文件名 另提供附件)\n" +
                    "    BUDGET,                     -- 预算（亿）\n" +
                    "    FILING_APPLICATION_FORM,    -- 备案申请表 (文件名 另提供附件)\n" +
                    "    FILING_APPLICATION_TIME,    -- 备案申请时间\n" +
                    "    FILING_APPROVAL_TIME,       -- 备案通过时间\n" +
                    "    APPROVAL_DOCUMENT,          -- 批复文件 (文件名 另提供附件)\n" +
                    "    APPROVAL_TIME,              -- 批复时间\n" +
                    "    APPROVAL_UNIT,              -- 批复单位\n" +
                    "    APPROVAL_DOC_NUMBER,        -- 批复文号\n" +
                    "    ConferenceName,              -- 会议名称\n" +
                    "\tFILENAME\n" +
                    ")\n" +
                    "SELECT \n" +
                    "    PROJECT_NAME,  -- 项目名称\n" +
                    "    PROJECT_CODE,  -- 项目编号\n" +
                    "    NULL,  -- 标段名称\n" +
                    "    NULL,  -- 标段号\n" +
                    "    NULL,  -- 设计管理部门负责人\n" +
                    "    NULL,  -- 设计管理部门\n" +
                    "    NULL,  -- 负责人联系方式\n" +
                    "    NULL,  -- 负责人身份证号\n" +
                    "    DESIGN_UNIT,  -- 设计单位\n" +
                    "    DESIGN_UNIT_LEADER,  -- 设计负责人\n" +
                    "    NULL,  -- 设计负责人联系方式\n" +
                    "    NULL,  -- 设计负责人身份证号\n" +
                    "    NULL,  -- 咨询单位\n" +
                    "    NULL,  -- 咨询负责人\n" +
                    "    NULL,  -- 咨询负责人联系方式\n" +
                    "    NULL,  -- 咨询负责人身份证号\n" +
                    "    NULL,  -- 勘察内容 (关键内容)\n" +
                    "    NULL,  -- 勘察设计文件 (文件名 另提供附件)\n" +
                    "    NULL,  -- 施工图设计方案 (文件名 另提供附件)\n" +
                    "    NULL,  -- 预算（亿）\n" +
                    "    NULL,  -- 备案申请表 (文件名 另提供附件)\n" +
                    "    NULL,  -- 备案申请时间\n" +
                    "    NULL,  -- 备案通过时间\n" +
                    "    APPROVAL_DOCUMENT,  -- 批复文件 (文件名 另提供附件)\n" +
                    "    APPROVAL_DATE,  -- 批复时间\n" +
                    "    APPROVAL_UNIT,  -- 批复单位\n" +
                    "    APPROVAL_NUMBER,  -- 批复文号\n" +
                    "    NULL,   -- 会议名称\n" +
                    "\tAPPROVAL_DOCUMENT_NAME\n" +
                    "-- 后续需自行替换为实际源表（如 FROM 你的源表名 WHERE 条件），当前用虚表示例\n" +
                    "FROM API_A_VIEW_SGTSJPF;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IAViewXmsgxkService iAViewXmsgxkService;

    @Override
    public void JJXMSGXK() {
        doTask("项目施工许可","API_A_VIEW_XMSGXK",JJXMSGXKUrl,JJXMSGXKToken,orgCode,500,500,null,null,iAViewXmsgxkService,AViewXmsgxk.class);
        try {
            String deleteSql = "DELETE FROM API_CONSTRUCTION_PERMIT WHERE PROJECT_NAME IN (SELECT PROJECT_NAME FROM API_A_VIEW_XMSGXK)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_CONSTRUCTION_PERMIT (\n" +
                    "    PROJECT_NAME,               -- 项目名称（非空约束）\n" +
                    "    PROJECT_CODE,               -- 项目编号（非空约束）\n" +
                    "    CONSTRUCTION_APPROVAL_UNIT, -- 施工许可批复单位（非空约束）\n" +
                    "    CONSTRUCTION_PERMIT_FILE,   -- 施工许可证，索引地址（非空约束）\n" +
                    "    CONSTRUCTION_PERMIT_DATE,   -- 施工许可证时间，格式为YYYY-MM-DD（非空约束）\n" +
                    "    FILENAME                    -- 文件中文名\n" +
                    ")\n" +
                    "SELECT \n" +
                    "    PROJECT_NAME,  -- 项目名称（?? 非空字段，需替换为实际值，否则插入失败）\n" +
                    "    PROJECT_NUMBER,  -- 项目编号（?? 非空字段，需替换为实际值，否则插入失败）\n" +
                    "    CONSTRUCTION_APPROVAL_UNIT,  -- 施工许可批复单位（?? 非空字段，需替换为实际值，否则插入失败）\n" +
                    "    CONSTRUCTION_PERMIT_FILE,  -- 施工许可证，索引地址（?? 非空字段，需替换为实际值，否则插入失败）\n" +
                    "    CONSTRUCTION_PERMIT_DATE,  -- 施工许可证时间，格式为YYYY-MM-DD（?? 非空DATE字段，需按格式赋值，示例：TO_DATE(a.许可时间, 'yyyy-mm-dd')）\n" +
                    "    CONSTRUCTION_PERMIT_FILE_NAME   -- 文件中文名\n" +
                    "-- 后续需自行替换为实际源表（如 FROM 你的源表名 WHERE 条件），当前用虚表示例\n" +
                    "FROM API_A_VIEW_XMSGXK";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IAViewXmsgxxService iAViewXmsgxxService;

    @Override
    public void JJXMSGXX() {
        doTask("项目施工信息","API_A_VIEW_XMSGXX",JJXMSGXXUrl,JJXMSGXXToken,orgCode,500,500,null,null,iAViewXmsgxxService,AViewXmsgxx.class);
        try {
            String deleteSql = "DELETE FROM API_PROJECT_CONSTRUCTION_INFO WHERE PROJECTNAME IN (SELECT PROJECT_NAME FROM API_A_VIEW_XMSGXX)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_PROJECT_CONSTRUCTION_INFO (\n" +
                    "    PROJECTCODE,                  -- 项目编号\n" +
                    "    PARAGRAPHNAME,                -- 标段名称\n" +
                    "    PARAGRAPHID,                  -- 标段编号\n" +
                    "    FZDANWEI,                     -- 负责单位（指挥部）\n" +
                    "    XMFUZEREN,                    -- 负责人\n" +
                    "    PERSONPHONE,                  -- 负责人联系方式\n" +
                    "    JGDANWEI,                     -- 监管单位\n" +
                    "    JLDANWEI,                     -- 监理单位\n" +
                    "    JLFUZEREN,                    -- 监理单位负责人\n" +
                    "    SGDANWEI,                     -- 施工单位\n" +
                    "    CONSTRUCTIONUNITCODE,         -- 施工单位代码\n" +
                    "    CONSTRUCTIONUNITPERSON,       -- 施工单位负责人\n" +
                    "    CONSTRUCTIONUNITPERSONCONTACT,-- 施工单位负责人联系方式\n" +
                    "    CONSTRUCTIONUNITLEADERIDCARD, -- 施工单位负责人身份证号\n" +
                    "    XGFILE,                       -- 质量报监等相关材料\n" +
                    "    CONSTRUCTIONSBFILE,           -- 施工许可申报材料\n" +
                    "    CONSTRUCTIONXKZ,              -- 施工许可证\n" +
                    "    KAIGONGSHIJIAN,               -- 开工时间\n" +
                    "    JIHUAJUNGONGRIQI,             -- 计划竣工日期\n" +
                    "    JIHUAWANCHENGSHIJIAN,         -- 计划完成时间\n" +
                    "    JIANSHEZHOUQI,                -- 建设周期\n" +
                    "    SHENPICAILIAO,                -- 审批材料（文件名 另提供附件）\n" +
                    "    SHIGONGHETONGWENJIAN,         -- 施工合同文件（文件名 另提供附件）\n" +
                    "    SHIGONGJINDU,                 -- 施工进度\n" +
                    "    ISSUBPACKAGE,                 -- 是否可以分包\n" +
                    "    Sectiontype,                  -- 标段类型\n" +
                    "    SectionConstruction,          -- 标段施工范围\n" +
                    "    ConstructionTime,             -- 施工许可申报时间\n" +
                    "    ConstructionpermitTime,       -- 施工许可证时间\n" +
                    "    SUPERVISION_SUPERVISOR,       -- 监理负责人\n" +
                    "    CONSTRUCTIONPERMIT,           -- 施工许可批复单位\n" +
                    "    temp_time,                    -- 临时时间字段\n" +
                    "    temp_kaigongshijian,          -- 临时开工时间\n" +
                    "    temp_jihuajungongriqi,        -- 临时计划竣工日期\n" +
                    "    temp_jihuawanChengshijian,    -- 临时计划完成时间\n" +
                    "    PROJECTNAME,                  -- 名称\n" +
                    "    totalProgress,                -- 精度\n" +
                    "    FILENAME                      -- 文件中文名\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    PROJECT_NUMBER, -- 项目编号\n" +
                    "    TENDER_NAME, -- 标段名称\n" +
                    "    NULL, -- 标段编号\n" +
                    "    RESPONSIBLE_UNIT, -- 负责单位（指挥部）\n" +
                    "    LEADER, -- 负责人\n" +
                    "    NULL, -- 负责人联系方式\n" +
                    "    NULL, -- 监管单位\n" +
                    "    NULL, -- 监理单位\n" +
                    "    SUPERVISION_SITE_DIRECTOR, -- 监理单位负责人\n" +
                    "    CONSTRUCTION_UNIT, -- 施工单位\n" +
                    "    NULL, -- 施工单位代码\n" +
                    "    CONSTRUCTION_SITE_DIRECTOR, -- 施工单位负责人\n" +
                    "    NULL, -- 施工单位负责人联系方式\n" +
                    "    NULL, -- 施工单位负责人身份证号\n" +
                    "    NULL, -- 质量报监等相关材料\n" +
                    "    NULL, -- 施工许可申报材料\n" +
                    "    NULL, -- 施工许可证\n" +
                    "    START_DATE, -- 开工时间\n" +
                    "    PLANNED_COMPLETION_DATE, -- 计划竣工日期\n" +
                    "    PLANNED_FINISH_DATE, -- 计划完成时间\n" +
                    "    CONSTRUCTION_PERIOD_MONTHS, -- 建设周期\n" +
                    "    NULL, -- 审批材料（文件名 另提供附件）\n" +
                    "    NULL, -- 施工合同文件（文件名 另提供附件）\n" +
                    "    NULL, -- 施工进度\n" +
                    "    NULL, -- 是否可以分包\n" +
                    "    NULL, -- 标段类型\n" +
                    "    CONSTRUCTION_SCOPE, -- 标段施工范围\n" +
                    "    NULL, -- 施工许可申报时间\n" +
                    "    NULL, -- 施工许可证时间\n" +
                    "    PERSON_IN_CHARGE, -- 监理负责人\n" +
                    "    NULL, -- 施工许可批复单位\n" +
                    "    NULL, -- 临时时间字段\n" +
                    "    NULL, -- 临时开工时间\n" +
                    "    NULL, -- 临时计划竣工日期\n" +
                    "    NULL, -- 临时计划完成时间\n" +
                    "    PROJECT_NAME, -- 名称\n" +
                    "    NULL, -- 精度\n" +
                    "    NULL  -- 文件中文名\n" +
                    "FROM API_A_VIEW_XMSGXX;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IAViewProjectInvestmentService iAViewProjectInvestmentService;

    @Override
    public void JJXMTZ() {
        doTask("项目投资","API_A_VIEW_PROJECT_INVESTMENT",JJXMTZUrl,JJXMTZToken,orgCode,500,500,null,null,iAViewProjectInvestmentService,AViewProjectInvestment.class);
    }

    @Resource
    private IAViewProjectTenderService iAViewProjectTenderService;

    @Override
    public void JJBDXX() {
        doTask("标段信息","API_A_VIEW_PROJECT_TENDER",JJBDXXUrl,JJBDXXToken,orgCode,500,500,null,null,iAViewProjectTenderService,AViewProjectTender.class);
        try {
            String deleteSql = "DELETE FROM API_PROJECT_TENDER WHERE PROJECT_NAME IN (SELECT PROJECT_NAME FROM API_A_VIEW_PROJECT_TENDER)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_PROJECT_TENDER (\n" +
                    "    PROJECT_NAME,    -- 项目名称\n" +
                    "    TENDER_NAME,     -- 招标名称\n" +
                    "    TYPE,            -- 类型\n" +
                    "    CONTRACTING_UNIT,-- 承包单位\n" +
                    "    TENDER_CODE      -- 标段编号\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    PROJECT_NAME,  -- 项目名称\n" +
                    "    TENDER_NAME,  -- 招标名称\n" +
                    "    TYPE,  -- 类型\n" +
                    "    CONTRACTING_UNIT,  -- 承包单位\n" +
                    "    NULL   -- 标段编号\n" +
                    "FROM API_A_VIEW_PROJECT_TENDER;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IAViewCspfService iAViewCspfService;

    @Override
    public void JJCSPFA() {
        doTask("初设批复","API_A_VIEW_CSPF",JJCSPFAUrl,JJCSPFAToken,orgCode,500,500,null,null,iAViewCspfService,AViewCspf.class);
        try {
            String deleteSql = "DELETE FROM API_PROJECT_PRE_DESIGN WHERE PROJECT_NAME IN (SELECT PROJECT_NAME FROM API_A_VIEW_CSPF)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_PROJECT_PRE_DESIGN (\n" +
                    "    PROJECT_NAME,               -- 项目名称\n" +
                    "    PROJECT_CODE,               -- 项目编号\n" +
                    "    SECTION_NAME,               -- 标段名称\n" +
                    "    SECTION_CODE,               -- 标段编号\n" +
                    "    OWNER_UNIT,                 -- 业主单位\n" +
                    "    PRELIMINARY_MANAGER,        -- 初设管理负责人\n" +
                    "    MANAGER_CONTACT,            -- 负责人联系方式\n" +
                    "    MANAGER_ID_CARD,            -- 负责人身份证号\n" +
                    "    SURVEY_UNIT,                -- 勘察单位\n" +
                    "    SURVEY_MANAGER,             -- 勘察单位负责人\n" +
                    "    SURVEY_MANAGER_CONTACT,     -- 勘察单位负责人联系方式\n" +
                    "    SURVEY_MANAGER_ID_CARD,     -- 勘察单位负责人身份证号\n" +
                    "    DESIGN_UNIT,                -- 设计单位\n" +
                    "    DESIGN_MANAGER,             -- 设计单位负责人\n" +
                    "    DESIGN_MANAGER_CONTACT,     -- 设计单位负责人联系方式\n" +
                    "    DESIGN_MANAGER_ID_CARD,     -- 设计单位负责人身份证号\n" +
                    "    DESIGN_CONSULT_UNIT,        -- 设计咨询单位\n" +
                    "    CONSULT_MANAGER,            -- 设计咨询单位负责人\n" +
                    "    CONSULT_MANAGER_CONTACT,    -- 咨询单位负责人联系方式\n" +
                    "    CONSULT_MANAGER_ID_CARD,    -- 咨询单位负责人身份证号\n" +
                    "    SURVEY_FILES,               -- 勘察文件（文件名 另提供附件）\n" +
                    "    SURVEY_CONTENT,             -- 勘察内容（关键内容）\n" +
                    "    PRE_DESIGN_FILES,           -- 初步设计方案（文件名 另提供附件）\n" +
                    "    BUDGET,                     -- 预算（亿）\n" +
                    "    APPROVAL_FILES,             -- 批复文件（文件名 另提供附件）\n" +
                    "    APPROVAL_UNIT,              -- 批复单位\n" +
                    "    APPROVAL_DATE,              -- 批复时间\n" +
                    "    APPROVAL_DOC_NO,            -- 批复文号\n" +
                    "    FILENAME                    -- 文件中文名\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    PROJECT_NAME,  -- 项目名称\n" +
                    "    PROJECT_NUMBER,  -- 项目编号\n" +
                    "    NULL,  -- 标段名称\n" +
                    "    NULL,  -- 标段编号\n" +
                    "    NULL,  -- 业主单位\n" +
                    "    NULL,  -- 初设管理负责人\n" +
                    "    NULL,  -- 负责人联系方式\n" +
                    "    NULL,  -- 负责人身份证号\n" +
                    "    NULL,  -- 勘察单位\n" +
                    "    NULL,  -- 勘察单位负责人\n" +
                    "    NULL,  -- 勘察单位负责人联系方式\n" +
                    "    NULL,  -- 勘察单位负责人身份证号\n" +
                    "    DESIGN_UNIT,  -- 设计单位\n" +
                    "    RESPONSIBLE_PERSON_DESIGN,  -- 设计单位负责人\n" +
                    "    NULL,  -- 设计单位负责人联系方式\n" +
                    "    NULL,  -- 设计单位负责人身份证号\n" +
                    "    NULL,  -- 设计咨询单位\n" +
                    "    NULL,  -- 设计咨询单位负责人\n" +
                    "    NULL,  -- 咨询单位负责人联系方式\n" +
                    "    NULL,  -- 咨询单位负责人身份证号\n" +
                    "    NULL,  -- 勘察文件（文件名 另提供附件）\n" +
                    "    NULL,  -- 勘察内容（关键内容）\n" +
                    "    NULL,  -- 初步设计方案（文件名 另提供附件）\n" +
                    "    NULL,  -- 预算（亿）\n" +
                    "    APPROVAL_DOCUMENT,  -- 批复文件（文件名 另提供附件）\n" +
                    "    APPROVAL_UNIT,  -- 批复单位\n" +
                    "    APPROVAL_TIME,  -- 批复时间\n" +
                    "    APPROVAL_NUMBER,  -- 批复文号\n" +
                    "    APPROVAL_DOCUMENT_NAME   -- 文件中文名\n" +
                    "FROM API_A_VIEW_CSPF;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IAViewGkpfService iAViewGkpfService;

    @Override
    public void JJGKPFA() {
        doTask("工可批复","API_A_VIEW_GKPF",JJGKPFAUrl,JJGKPFAToken,orgCode,500,500,null,null,iAViewGkpfService,AViewGkpf.class);
        try {
            String deleteSql = "DELETE FROM API_PROJECT_FEASIBILITY WHERE PROJECT_NAME IN (SELECT PROJECT_NAME FROM API_A_VIEW_GKPF)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_PROJECT_FEASIBILITY (\n" +
                    "    PROJECT_NAME,               -- 项目名称\n" +
                    "    PROJECT_CODE,               -- 项目编号\n" +
                    "    APPLY_UNIT,                 -- 申报单位\n" +
                    "    APPLY_LEADER,               -- 申报负责人\n" +
                    "    LEADER_CONTACT,             -- 负责人联系方式\n" +
                    "    LEADER_ID_CARD,             -- 负责人身份证号\n" +
                    "    BIDDING_METHOD,             -- 招标方式\n" +
                    "    BIDDING_DOCUMENT,           -- 招标文件(文件名 另提供附件)\n" +
                    "    FEASIBILITY_UNIT,           -- 可行性报告编制单位\n" +
                    "    UNIT_CONTACT_PERSON,        -- 编制单位联系人\n" +
                    "    CONTACT_PHONE,              -- 联系方式\n" +
                    "    CONTACT_ID_CARD,            -- 身份证号\n" +
                    "    CONSULTING_UNIT,            -- 工可咨询单位（铁路必填）\n" +
                    "    CONSULTING_CONTACT_PERSON,  -- 咨询单位联系人\n" +
                    "    CONSULTING_CONTACT_PHONE,   -- 联系人联系方式\n" +
                    "    CONSULTING_ID_CARD,         -- 联系人身份证号\n" +
                    "    FEASIBILITY_DOCUMENT,       -- 工可文件(文件名 另提供附件)\n" +
                    "    APPROVAL_DATE,              -- 批复时间\n" +
                    "    APPROVAL_DOCUMENT,          -- 批复文件\n" +
                    "    APPROVAL_NUMBER,            -- 批复文号\n" +
                    "    BIDYAOQIU,                  -- 招标要求\n" +
                    "    APPROVAL_UNIT,              -- 批复单位\n" +
                    "    FILENAME                    -- 文件中文名（新增字段）\n" +
                    ")\n" +
                    "SELECT \n" +
                    "    PROJECT_NAME,  -- 项目名称\n" +
                    "    PROJECT_NUMBER,  -- 项目编号\n" +
                    "    NULL,  -- 申报单位\n" +
                    "    NULL,  -- 申报负责人\n" +
                    "    NULL,  -- 负责人联系方式\n" +
                    "    NULL,  -- 负责人身份证号（可加正则校验：CASE WHEN REGEXP_LIKE(a.字段, '^[0-9Xx]{18}$') THEN a.字段 ELSE NULL END）\n" +
                    "    NULL,  -- 招标方式（若为数字编码，可转中文：CASE WHEN a.编码=1 THEN '公开招标' ELSE a.编码 END）\n" +
                    "    NULL,  -- 招标文件(文件名 另提供附件)\n" +
                    "    FEASIBILITY_REPORT_UNIT,  -- 可行性报告编制单位\n" +
                    "    REPORT_UNIT_CONTACT,  -- 编制单位联系人\n" +
                    "    NULL,  -- 联系方式\n" +
                    "    NULL,  -- 身份证号（同负责人身份证号，可加格式校验）\n" +
                    "    NULL,  -- 工可咨询单位（铁路必填，可标注：CASE WHEN 项目类型='铁路' THEN a.咨询单位 ELSE NULL END）\n" +
                    "    NULL,  -- 咨询单位联系人\n" +
                    "    NULL,  -- 联系人联系方式\n" +
                    "    NULL,  -- 联系人身份证号（可加格式校验）\n" +
                    "    NULL,  -- 工可文件(文件名 另提供附件)\n" +
                    "    APPROVAL_TIME,  -- 批复时间（若为字符串，可转标准格式：CASE WHEN a.批复时间 IS NOT NULL THEN TO_CHAR(TO_DATE(a.批复时间, '原格式'), 'yyyy-mm-dd') ELSE NULL END）\n" +
                    "    APPROVAL_DOCUMENT,  -- 批复文件\n" +
                    "    APPROVAL_NUMBER,  -- 批复文号\n" +
                    "    NULL,  -- 招标要求\n" +
                    "    APPROVAL_UNIT,  -- 批复单位\n" +
                    "    APPROVAL_DOCUMENT_NAME   -- 文件中文名（新增字段，注意长度≤50字符，避免截断）\n" +
                    "-- 后续需自行替换为实际源表（如 FROM 你的源表名 WHERE 条件），当前用虚表示例\n" +
                    "FROM API_A_VIEW_GKPF";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IAViewZtbBiddingnoticeService iaViewZtbBiddingnoticeService;

    @Override
    public void JJZTB() {
        doTask("沪武招投标数据","API_A_VIEW_ZTB_BIDDINGNOTICE",JJZTBUrl,JJZTBToken,orgCode,500,500,null,null,iaViewZtbBiddingnoticeService,AViewZtbBiddingnotice.class);
        try {
            String deleteSql = "DELETE FROM API_TENDER_PROJECT_INFO WHERE PROJECT_NAME IN (SELECT PROJECT_NAME FROM API_A_VIEW_ZTB_BIDDINGNOTICE)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_TENDER_PROJECT_INFO (\n" +
                    "    PROJECT_NAME,               -- 项目名称（非空，需替换NULL）\n" +
                    "    PROJECT_CODE,               -- 项目编号（非空，需替换NULL）\n" +
                    "    SECTION_NAME,               -- 标段名称（非空，需替换NULL）\n" +
                    "    SECTION_CODE,               -- 标段编号（非空，需替换NULL）\n" +
                    "    TENDERING_UNIT,             -- 招标单位（非空，需替换NULL）\n" +
                    "    TENDERING_METHOD,           -- 招标方式（非空，需替换NULL）\n" +
                    "    TENDER_AGENCY,              -- 招标代理单位（非空，需替换NULL）\n" +
                    "    TENDER_NOTICE_PUBLISH_TIME, -- 招标公告发布时间（非空，需替换NULL，格式YYYY-MM-DD）\n" +
                    "    WINNING_UNIT,               -- 中标单位（非空，需替换NULL）\n" +
                    "    CONTRACT_FILE_NAME,         -- 合同文件名称（非空，需替换NULL）\n" +
                    "    CONTRACT_FILE_URL           -- 合同文件访问地址（非空，需替换NULL）\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    PROJECT_NAME,  -- 需替换为实际项目名称（如'XX项目'）\n" +
                    "    PROJECT_CODE,  -- 需替换为实际项目编号（如'XM001'）\n" +
                    "    PARAGRAPHNAME,  -- 需替换为实际标段名称（如'第1标段'）\n" +
                    "    PARAGRAPHCODE,  -- 需替换为实际标段编号（如'BD001'）\n" +
                    "    NULL,  -- 需替换为实际招标单位（如'XX集团'）\n" +
                    "    BIDTYPE,  -- 需替换为实际招标方式（如'公开招标'）\n" +
                    "    AGENTCOMPANYNAME,  -- 需替换为实际代理单位（如'XX代理公司'）\n" +
                    "    PUBLISHTIME,  -- 需替换为实际发布时间（如'2024-06-01'）\n" +
                    "    BIDDERCOMPANYNAME,  -- 需替换为实际中标单位（如'XX建筑公司'）\n" +
                    "    NULL,  -- 需替换为实际合同名称（如'XX合同.pdf'）\n" +
                    "    NULL   -- 需替换为实际合同URL（如'http://xxx.com/contract.pdf'）\n" +
                    "FROM API_A_VIEW_ZTB_BIDDINGNOTICE;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IZtbBiddingnoticecontractService iZtbBiddingnoticecontractService;

    @Override
    public void ZTBHTB() {
        doTask("招投标合同表","API_ZTB_BIDDINGNOTICECONTRACT",ZTBHTBUrl,ZTBHTBToken,orgCode,500,500,null,null,iZtbBiddingnoticecontractService,ZtbBiddingnoticecontract.class);
    }

    @Resource
    private IY029CspfService iy029CspfService;

    @Override
    public void GDCSPF() {
        doTask("初设批复","API_Y029_CSPF",GDCSPFUrl,GDCSPFToken,orgCode,500,500,null,null,iy029CspfService,Y029Cspf.class);
        try {
            String deleteSql = "DELETE FROM API_PROJECT_PRE_DESIGN WHERE PROJECT_NAME IN (SELECT XMMC FROM API_Y029_CSPF)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_PROJECT_PRE_DESIGN (\n" +
                    "    PROJECT_NAME,               -- 项目名称\n" +
                    "    PROJECT_CODE,               -- 项目编号\n" +
                    "    SECTION_NAME,               -- 标段名称\n" +
                    "    SECTION_CODE,               -- 标段编号\n" +
                    "    OWNER_UNIT,                 -- 业主单位\n" +
                    "    PRELIMINARY_MANAGER,        -- 初设管理负责人\n" +
                    "    MANAGER_CONTACT,            -- 负责人联系方式\n" +
                    "    MANAGER_ID_CARD,            -- 负责人身份证号\n" +
                    "    SURVEY_UNIT,                -- 勘察单位\n" +
                    "    SURVEY_MANAGER,             -- 勘察单位负责人\n" +
                    "    SURVEY_MANAGER_CONTACT,     -- 勘察单位负责人联系方式\n" +
                    "    SURVEY_MANAGER_ID_CARD,     -- 勘察单位负责人身份证号\n" +
                    "    DESIGN_UNIT,                -- 设计单位\n" +
                    "    DESIGN_MANAGER,             -- 设计单位负责人\n" +
                    "    DESIGN_MANAGER_CONTACT,     -- 设计单位负责人联系方式\n" +
                    "    DESIGN_MANAGER_ID_CARD,     -- 设计单位负责人身份证号\n" +
                    "    DESIGN_CONSULT_UNIT,        -- 设计咨询单位\n" +
                    "    CONSULT_MANAGER,            -- 设计咨询单位负责人\n" +
                    "    CONSULT_MANAGER_CONTACT,    -- 咨询单位负责人联系方式\n" +
                    "    CONSULT_MANAGER_ID_CARD,    -- 咨询单位负责人身份证号\n" +
                    "    SURVEY_FILES,               -- 勘察文件（文件名 另提供附件）\n" +
                    "    SURVEY_CONTENT,             -- 勘察内容（关键内容）\n" +
                    "    PRE_DESIGN_FILES,           -- 初步设计方案（文件名 另提供附件）\n" +
                    "    BUDGET,                     -- 预算（亿）\n" +
                    "    APPROVAL_FILES,             -- 批复文件（文件名 另提供附件）\n" +
                    "    APPROVAL_UNIT,              -- 批复单位\n" +
                    "    APPROVAL_DATE,              -- 批复时间\n" +
                    "    APPROVAL_DOC_NO,            -- 批复文号\n" +
                    "    FILENAME                    -- 文件中文名\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC,  -- 项目名称\n" +
                    "    XMBH,  -- 项目编号\n" +
                    "    NULL,  -- 标段名称\n" +
                    "    NULL,  -- 标段编号\n" +
                    "    NULL,  -- 业主单位\n" +
                    "    NULL,  -- 初设管理负责人\n" +
                    "    NULL,  -- 负责人联系方式\n" +
                    "    NULL,  -- 负责人身份证号\n" +
                    "    NULL,  -- 勘察单位\n" +
                    "    NULL,  -- 勘察单位负责人\n" +
                    "    NULL,  -- 勘察单位负责人联系方式\n" +
                    "    NULL,  -- 勘察单位负责人身份证号\n" +
                    "    CSSJDW,  -- 设计单位\n" +
                    "    SJDWFZR,  -- 设计单位负责人\n" +
                    "    NULL,  -- 设计单位负责人联系方式\n" +
                    "    NULL,  -- 设计单位负责人身份证号\n" +
                    "    NULL,  -- 设计咨询单位\n" +
                    "    NULL,  -- 设计咨询单位负责人\n" +
                    "    NULL,  -- 咨询单位负责人联系方式\n" +
                    "    NULL,  -- 咨询单位负责人身份证号\n" +
                    "    NULL,  -- 勘察文件（文件名 另提供附件）\n" +
                    "    NULL,  -- 勘察内容（关键内容）\n" +
                    "    NULL,  -- 初步设计方案（文件名 另提供附件）\n" +
                    "    NULL,  -- 预算（亿）\n" +
                    "    PFWJFWDZ,  -- 批复文件（文件名 另提供附件）\n" +
                    "    CSPFDW,  -- 批复单位\n" +
                    "    CSPFSJ,  -- 批复时间\n" +
                    "    CSPFWH,  -- 批复文号\n" +
                    "    PFWJMC   -- 文件中文名\n" +
                    "FROM API_Y029_CSPF;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IY029ZtbxxService iY029ZtbxxService;

    @Override
    public void GDZTB() {
        doTask("招投标信息","API_Y029_ZTBXX",GDZTBUrl,GDZTBToken,orgCode,500,500,null,null,iY029ZtbxxService,Y029Ztbxx.class);
        try {
            String deleteSql = "DELETE FROM API_TENDER_PROJECT_INFO WHERE PROJECT_NAME IN (SELECT xmmc FROM API_Y029_ZTBXX)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_TENDER_PROJECT_INFO (\n" +
                    "                    PROJECT_NAME,               -- 项目名称（非空，需替换NULL）\n" +
                    "                    PROJECT_CODE,               -- 项目编号（非空，需替换NULL）\n" +
                    "                    SECTION_NAME,               -- 标段名称（非空，需替换NULL）\n" +
                    "                    SECTION_CODE,               -- 标段编号（非空，需替换NULL）\n" +
                    "                    TENDERING_UNIT,             -- 招标单位（非空，需替换NULL）\n" +
                    "                    TENDERING_METHOD,           -- 招标方式（非空，需替换NULL）\n" +
                    "                    TENDER_AGENCY,              -- 招标代理单位（非空，需替换NULL）\n" +
                    "                    TENDER_NOTICE_PUBLISH_TIME, -- 招标公告发布时间（非空，需替换NULL，格式YYYY-MM-DD）\n" +
                    "                    WINNING_UNIT,               -- 中标单位（非空，需替换NULL）\n" +
                    "                    CONTRACT_FILE_NAME,         -- 合同文件名称（非空，需替换NULL）\n" +
                    "                    CONTRACT_FILE_URL           -- 合同文件访问地址（非空，需替换NULL）\n" +
                    "                    )\n" +
                    "                    SELECT\n" +
                    "                    XMMC,  -- 需替换为实际项目名称（如'XX项目'）\n" +
                    "                    XMBH,  -- 需替换为实际项目编号（如'XM001'）\n" +
                    "                    BDMC,  -- 需替换为实际标段名称（如'第1标段'）\n" +
                    "                    BDBH,  -- 需替换为实际标段编号（如'BD001'）\n" +
                    "                    ZBDW1,  -- 需替换为实际招标单位（如'XX集团'）\n" +
                    "                    ZBFS,  -- 需替换为实际招标方式（如'公开招标'）\n" +
                    "                    ZBDLDW,  -- 需替换为实际代理单位（如'XX代理公司'）\n" +
                    "                    ZBGGFBSJ,  -- 需替换为实际发布时间（如'2024-06-01'）\n" +
                    "                    ZBDW2,  -- 需替换为实际中标单位（如'XX建筑公司'）\n" +
                    "                    HTWJMC,  -- 需替换为实际合同名称（如'XX合同.pdf'）\n" +
                    "                    HTWJFWDZ   -- 需替换为实际合同URL（如'http://xxx.com/contract.pdf'）\n" +
                    "                    FROM API_Y029_ZTBXX;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IY029SgtsjpfService iy029SgtsjpfService;

    @Override
    public void GDSGTSJPF() {
        doTask("施工图设计批复","API_Y029_SGTSJPF",GDSGTSJPFUrl,GDSGTSJPFToken,orgCode,500,500,null,null,iy029SgtsjpfService,Y029Sgtsjpf.class);
        try {
            String deleteSql = "DELETE FROM API_CONSTRUCTION_DRAWING_DESIGN WHERE projectname in (select xmmc from API_Y029_SGTSJPF)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_CONSTRUCTION_DRAWING_DESIGN (\n" +
                    "    PROJECTNAME,                -- 项目名称\n" +
                    "    PROJECTCODE,                -- 项目编号\n" +
                    "    PARAGRAPHNAME,              -- 标段名称\n" +
                    "    PARAGRAPHNUMBER,            -- 标段号\n" +
                    "    DESIGN_DEPT_HEAD,           -- 设计管理部门负责人\n" +
                    "    DESIGN_DEPARTMENT,          -- 设计管理部门\n" +
                    "    HEAD_CONTACT,               -- 负责人联系方式\n" +
                    "    HEAD_IDCARD,                -- 负责人身份证号\n" +
                    "    DESIGNUNIT,                 -- 设计单位\n" +
                    "    DESIGN_HEAD,                -- 设计负责人\n" +
                    "    DESIGN_HEAD_CONTACT,        -- 设计负责人联系方式\n" +
                    "    DESIGN_HEAD_IDCARD,         -- 设计负责人身份证号\n" +
                    "    CONSULTINGUNIT,             -- 咨询单位\n" +
                    "    CONSULTING_HEAD,            -- 咨询负责人\n" +
                    "    CONSULTING_HEAD_CONTACT,    -- 咨询负责人联系方式\n" +
                    "    CONSULTING_HEAD_IDCARD,     -- 咨询负责人身份证号\n" +
                    "    SURVEY_CONTENT,             -- 勘察内容 (关键内容)\n" +
                    "    SURVEY_DESIGN_FILE,         -- 勘察设计文件 (文件名 另提供附件)\n" +
                    "    CONSTRUCTION_DRAWING_PLAN,  -- 施工图设计方案 (文件名 另提供附件)\n" +
                    "    BUDGET,                     -- 预算（亿）\n" +
                    "    FILING_APPLICATION_FORM,    -- 备案申请表 (文件名 另提供附件)\n" +
                    "    FILING_APPLICATION_TIME,    -- 备案申请时间\n" +
                    "    FILING_APPROVAL_TIME,       -- 备案通过时间\n" +
                    "    APPROVAL_DOCUMENT,          -- 批复文件 (文件名 另提供附件)\n" +
                    "    APPROVAL_TIME,              -- 批复时间\n" +
                    "    APPROVAL_UNIT,              -- 批复单位\n" +
                    "    APPROVAL_DOC_NUMBER,        -- 批复文号\n" +
                    "    ConferenceName,             -- 会议名称\n" +
                    "    FILENAME                    -- 文件中文名\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC,  -- 项目名称\n" +
                    "    XMBH,  -- 项目编号\n" +
                    "    NULL,  -- 标段名称\n" +
                    "    NULL,  -- 标段号\n" +
                    "    NULL,  -- 设计管理部门负责人\n" +
                    "    NULL,  -- 设计管理部门\n" +
                    "    NULL,  -- 负责人联系方式\n" +
                    "    NULL,  -- 负责人身份证号\n" +
                    "    SJDW,  -- 设计单位\n" +
                    "    SJDWFZR,  -- 设计负责人\n" +
                    "    NULL,  -- 设计负责人联系方式\n" +
                    "    NULL,  -- 设计负责人身份证号\n" +
                    "    NULL,  -- 咨询单位\n" +
                    "    NULL,  -- 咨询负责人\n" +
                    "    NULL,  -- 咨询负责人联系方式\n" +
                    "    NULL,  -- 咨询负责人身份证号\n" +
                    "    NULL,  -- 勘察内容 (关键内容)\n" +
                    "    NULL,  -- 勘察设计文件 (文件名 另提供附件)\n" +
                    "    NULL,  -- 施工图设计方案 (文件名 另提供附件)\n" +
                    "    NULL,  -- 预算（亿）\n" +
                    "    NULL,  -- 备案申请表 (文件名 另提供附件)\n" +
                    "    NULL,  -- 备案申请时间（DATE类型，可留空）\n" +
                    "    NULL,  -- 备案通过时间（DATE类型，可留空）\n" +
                    "    PFWJFWDZ,  -- 批复文件 (文件名 另提供附件)\n" +
                    "    PFSJ,  -- 批复时间（DATE类型，可留空）\n" +
                    "    PFDW,  -- 批复单位\n" +
                    "    PFWH,  -- 批复文号\n" +
                    "    NULL,  -- 会议名称（CHAR(255)，NULL不占长度）\n" +
                    "    PFWJMC   -- 文件中文名\n" +
                    "FROM API_Y029_SGTSJPF;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IY029GkpfxxService iY029GkpfxxService;

    @Override
    public void GDGKPF() {
        doTask("工可批复信息","API_Y029_GKPFXX",GDGKPFUrl,GDGKPFToken,orgCode,500,500,null,null,iY029GkpfxxService,Y029Gkpfxx.class);
        try {
            String deleteSql = "DELETE FROM API_PROJECT_FEASIBILITY WHERE PROJECT_NAME IN (SELECT XMMC FROM API_Y029_GKPFXX)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_PROJECT_FEASIBILITY (\n" +
                    "    PROJECT_NAME,               -- 项目名称\n" +
                    "    PROJECT_CODE,               -- 项目编号\n" +
                    "    APPLY_UNIT,                 -- 申报单位\n" +
                    "    APPLY_LEADER,               -- 申报负责人\n" +
                    "    LEADER_CONTACT,             -- 负责人联系方式\n" +
                    "    LEADER_ID_CARD,             -- 负责人身份证号\n" +
                    "    BIDDING_METHOD,             -- 招标方式\n" +
                    "    BIDDING_DOCUMENT,           -- 招标文件(文件名 另提供附件)\n" +
                    "    FEASIBILITY_UNIT,           -- 可行性报告编制单位\n" +
                    "    UNIT_CONTACT_PERSON,        -- 编制单位联系人\n" +
                    "    CONTACT_PHONE,              -- 编制单位联系人联系方式\n" +
                    "    CONTACT_ID_CARD,            -- 编制单位联系人身份证号\n" +
                    "    CONSULTING_UNIT,            -- 工可咨询单位（铁路必填）\n" +
                    "    CONSULTING_CONTACT_PERSON,  -- 咨询单位联系人\n" +
                    "    CONSULTING_CONTACT_PHONE,   -- 咨询单位联系人联系方式\n" +
                    "    CONSULTING_ID_CARD,         -- 咨询单位联系人身份证号\n" +
                    "    FEASIBILITY_DOCUMENT,       -- 工可文件(文件名 另提供附件)\n" +
                    "    APPROVAL_DATE,              -- 批复时间\n" +
                    "    APPROVAL_DOCUMENT,          -- 批复文件(文件名 另提供附件)\n" +
                    "    APPROVAL_NUMBER,            -- 批复文号\n" +
                    "    BIDYAOQIU,                  -- 招标要求\n" +
                    "    APPROVAL_UNIT,              -- 批复单位\n" +
                    "    FILENAME                    -- 文件中文名\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC,  -- 项目名称\n" +
                    "    XMBH,  -- 项目编号\n" +
                    "    NULL,  -- 申报单位\n" +
                    "    NULL,  -- 申报负责人\n" +
                    "    NULL,  -- 负责人联系方式\n" +
                    "    NULL,  -- 负责人身份证号\n" +
                    "    NULL,  -- 招标方式\n" +
                    "    NULL,  -- 招标文件(文件名 另提供附件)\n" +
                    "    GKBZDW,  -- 可行性报告编制单位\n" +
                    "    GKBZDWFZR,  -- 编制单位联系人\n" +
                    "    NULL,  -- 编制单位联系人联系方式\n" +
                    "    NULL,  -- 编制单位联系人身份证号\n" +
                    "    NULL,  -- 工可咨询单位（铁路必填）\n" +
                    "    NULL,  -- 咨询单位联系人\n" +
                    "    NULL,  -- 咨询单位联系人联系方式\n" +
                    "    NULL,  -- 咨询单位联系人身份证号\n" +
                    "    NULL,  -- 工可文件(文件名 另提供附件)\n" +
                    "    PFSJ,  -- 批复时间\n" +
                    "    PFWJFWDZ,  -- 批复文件(文件名 另提供附件)\n" +
                    "    PFWH,  -- 批复文号\n" +
                    "    NULL,  -- 招标要求\n" +
                    "    PFDW,  -- 批复单位\n" +
                    "    PFWJMC   -- 文件中文名\n" +
                    "-- 替换为你的实际源表\n" +
                    "FROM API_Y029_GKPFXX";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IY029GzsjxxService iy029GzsjxxService;

    @Override
    public void GDGZSJ() {
        doTask("跟踪审计信息","API_Y029_GZSJXX",GDGZSJUrl,GDGZSJToken,orgCode,500,500,null,null,iy029GzsjxxService,Y029Gzsjxx.class);
        try {
            String deleteSql = "DELETE FROM API_Auditing_Info WHERE PROJECT_NAME IN (SELECT XMMC FROM API_Y029_GZSJXX)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_Auditing_Info (\n" +
                    "    Project_No,                  -- 项目编号\n" +
                    "    Bid_Section_No,              -- 标段编号\n" +
                    "    Bid_Section_Name,            -- 标段名称\n" +
                    "    Auditing_Unit,               -- 审计单位\n" +
                    "    Auditing_Responsible_Person, -- 审计负责人员\n" +
                    "    Auditing_Content,            -- 审计内容\n" +
                    "    Auditing_Time,               -- 审计时间\n" +
                    "    Auditing_Report,             -- 审计报告\n" +
                    "    PROJECT_NAME,                 -- 项目名称\n" +
                    "\tFILENAME\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMBH, -- 项目编号\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    SJDW, -- 审计单位\n" +
                    "    SJFZRY, -- 审计负责人员\n" +
                    "    SJNR, -- 审计内容\n" +
                    "    SJSJ, -- 审计时间（格式如'2024-12-10'或'2024年12月'）\n" +
                    "    SJBGFWDZ, -- 审计报告（文件名，另提供附件）\n" +
                    "    XMMC,  -- 项目名称（VARCHAR2(50)，长度≤50位）\n" +
                    "\tSJBGMC\n" +
                    "FROM API_Y029_GZSJXX;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private ISjcsXmzlbService iSjcsXmzlbService;

    @Override
    public void GHXMB() {
        doTask("项目总览表","API_SJCS_XMZLB",GHXMBUrl,GHXMBToken,orgCode,500,500,null,null,iSjcsXmzlbService,SjcsXmzlb.class);
        try {
            String deleteSql = "DELETE FROM API_PROJECT_INFO WHERE PROTYPE = 'GH'";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_PROJECT_INFO (\n" +
                    "    PROJECT_NAME,               -- 项目名称（非空）\n" +
                    "    PROJECT_CODE,               -- 项目编号\n" +
                    "    CONSTRUCTION_UNIT,          -- 建设单位\n" +
                    "    MANAGEMENT_TYPE,            -- 管理类型\n" +
                    "    PROJECT_TYPE,               -- 项目类型（铁路、高速公路、国道、干线航道、水运）\n" +
                    "    CONSTRUCTION_STATUS,        -- 建设状态\n" +
                    "    TOTAL_INVESTMENT,           -- 总投资（亿）\n" +
                    "    CONSTRUCTION_STANDARD,      -- 建设标准\n" +
                    "    PROJECT_SCALE,              -- 项目规模（公里）\n" +
                    "    PROJECT_PROGRESS,           -- 项目进度(九大环节)\n" +
                    "    START_POINT,                -- 项目建设起点（经纬度）\n" +
                    "    END_POINT,                  -- 项目建设终点（经纬度）\n" +
                    "    IS_SECTIONED,               -- 项目是否分标段\n" +
                    "    DESIGN_SPEED,               -- 设计时速（kmh）\n" +
                    "    CONSTRUCTION_PERIOD,        -- 建设周期\n" +
                    "    APPROVAL_DATE,              -- 立项日期\n" +
                    "    START_DATE,                 -- 开工日期\n" +
                    "    PLAN_END_DATE,              -- 计划竣工日期\n" +
                    "    PLAN_COMPLETION_DATE,       -- 计划完成时间\n" +
                    "    IS_COMPLETED_OR_ADVANCED,   -- 项目是否完成或提前结束\n" +
                    "    UNIT,                       -- 实施主体\n" +
                    "    BDNUMBER,                   -- 标段总数\n" +
                    "    YWCTZE,                     -- 已完成投资额\n" +
                    "    PROTYPE,                    -- 项目类型（区分单位）\n" +
                    "    SPTIME,                     -- 审批时间\n" +
                    "    SPEND                       -- 审批有效期\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC,  -- 项目名称（非空字段，需替换为实际值，否则报错）\n" +
                    "    XMBH,  -- 项目编号\n" +
                    "    NULL,  -- 建设单位\n" +
                    "    NULL,  -- 管理类型\n" +
                    "    XMLX,  -- 项目类型\n" +
                    "    JSZT,  -- 建设状态\n" +
                    "    ZTZ,  -- 总投资（亿）\n" +
                    "    JSBZ,  -- 建设标准\n" +
                    "    XMGM,  -- 项目规模（公里）\n" +
                    "    XMJD,  -- 项目进度(九大环节)\n" +
                    "    NULL,  -- 项目建设起点（经纬度）\n" +
                    "    NULL,  -- 项目建设终点（经纬度）\n" +
                    "    NULL,  -- 项目是否分标段\n" +
                    "    NULL,  -- 设计时速（kmh）\n" +
                    "    NULL,  -- 建设周期\n" +
                    "    LXSJ,  -- 立项日期\n" +
                    "    NULL,  -- 开工日期\n" +
                    "    NULL,  -- 计划竣工日期\n" +
                    "    NULL,  -- 计划完成时间\n" +
                    "    NULL,  -- 项目是否完成或提前结束\n" +
                    "    SSZT,  -- 实施主体\n" +
                    "    NULL,  -- 标段总数\n" +
                    "    YWCTZ,  -- 已完成投资额\n" +
                    "    'GH',  -- 项目类型（区分单位）\n" +
                    "    NULL,  -- 审批时间\n" +
                    "    NULL   -- 审批有效期\n" +
                    "-- 替换为你的实际源表\n" +
                    "FROM API_SJCS_XMZLB";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private ISjcsCspfService iSjcsCspfService;

    @Override
    public void GHCSPF() {
        doTask("初设批复","API_SJCS_CSPF",GHCSPFUrl,GHCSPFToken,orgCode,500,500,null,null,iSjcsCspfService,SjcsCspf.class);
        try {
            String deleteSql = "DELETE FROM API_PROJECT_PRE_DESIGN WHERE PROJECT_NAME IN (SELECT XMMC FROM API_SJCS_CSPF)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_PROJECT_PRE_DESIGN (\n" +
                    "    PROJECT_NAME,               -- 项目名称\n" +
                    "    PROJECT_CODE,               -- 项目编号\n" +
                    "    SECTION_NAME,               -- 标段名称\n" +
                    "    SECTION_CODE,               -- 标段编号\n" +
                    "    OWNER_UNIT,                 -- 业主单位\n" +
                    "    PRELIMINARY_MANAGER,        -- 初设管理负责人\n" +
                    "    MANAGER_CONTACT,            -- 负责人联系方式\n" +
                    "    MANAGER_ID_CARD,            -- 负责人身份证号\n" +
                    "    SURVEY_UNIT,                -- 勘察单位\n" +
                    "    SURVEY_MANAGER,             -- 勘察单位负责人\n" +
                    "    SURVEY_MANAGER_CONTACT,     -- 勘察单位负责人联系方式\n" +
                    "    SURVEY_MANAGER_ID_CARD,     -- 勘察单位负责人身份证号\n" +
                    "    DESIGN_UNIT,                -- 设计单位\n" +
                    "    DESIGN_MANAGER,             -- 设计单位负责人\n" +
                    "    DESIGN_MANAGER_CONTACT,     -- 设计单位负责人联系方式\n" +
                    "    DESIGN_MANAGER_ID_CARD,     -- 设计单位负责人身份证号\n" +
                    "    DESIGN_CONSULT_UNIT,        -- 设计咨询单位\n" +
                    "    CONSULT_MANAGER,            -- 设计咨询单位负责人\n" +
                    "    CONSULT_MANAGER_CONTACT,    -- 咨询单位负责人联系方式\n" +
                    "    CONSULT_MANAGER_ID_CARD,    -- 咨询单位负责人身份证号\n" +
                    "    SURVEY_FILES,               -- 勘察文件（文件名 另提供附件）\n" +
                    "    SURVEY_CONTENT,             -- 勘察内容（关键内容）\n" +
                    "    PRE_DESIGN_FILES,           -- 初步设计方案（文件名 另提供附件）\n" +
                    "    BUDGET,                     -- 预算（亿）\n" +
                    "    APPROVAL_FILES,             -- 批复文件（文件名 另提供附件）\n" +
                    "    APPROVAL_UNIT,              -- 批复单位\n" +
                    "    APPROVAL_DATE,              -- 批复时间\n" +
                    "    APPROVAL_DOC_NO,            -- 批复文号\n" +
                    "    FILENAME                    -- 文件中文名\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC,  -- 项目名称\n" +
                    "    XMBH,  -- 项目编号\n" +
                    "    NULL,  -- 标段名称\n" +
                    "    NULL,  -- 标段编号\n" +
                    "    NULL,  -- 业主单位\n" +
                    "    NULL,  -- 初设管理负责人\n" +
                    "    NULL,  -- 负责人联系方式\n" +
                    "    NULL,  -- 负责人身份证号\n" +
                    "    NULL,  -- 勘察单位\n" +
                    "    NULL,  -- 勘察单位负责人\n" +
                    "    NULL,  -- 勘察单位负责人联系方式\n" +
                    "    NULL,  -- 勘察单位负责人身份证号\n" +
                    "    CSSJDW,  -- 设计单位\n" +
                    "    CSDWFZR,  -- 设计单位负责人\n" +
                    "    NULL,  -- 设计单位负责人联系方式\n" +
                    "    NULL,  -- 设计单位负责人身份证号\n" +
                    "    NULL,  -- 设计咨询单位\n" +
                    "    NULL,  -- 设计咨询单位负责人\n" +
                    "    NULL,  -- 咨询单位负责人联系方式\n" +
                    "    NULL,  -- 咨询单位负责人身份证号\n" +
                    "    NULL,  -- 勘察文件（文件名 另提供附件）\n" +
                    "    NULL,  -- 勘察内容（关键内容）\n" +
                    "    NULL,  -- 初步设计方案（文件名 另提供附件）\n" +
                    "    NULL,  -- 预算（亿）\n" +
                    "    PFWJFWDZ,  -- 批复文件（文件名 另提供附件）\n" +
                    "    CSPFDW,  -- 批复单位\n" +
                    "    CSPFSJ,  -- 批复时间\n" +
                    "    CSPFWH,  -- 批复文号\n" +
                    "    PFWJMC   -- 文件中文名\n" +
                    "FROM API_SJCS_CSPF;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private ISjcsXmbdbService iSjcsXmbdbService;

    @Override
    public void GHBDB() {
        doTask("项目标段表","API_SJCS_XMBDB",GHBDBUrl,GHBDBToken,orgCode,500,500,null,null,iSjcsXmbdbService,SjcsXmbdb.class);
        try {
            String deleteSql = "DELETE FROM API_PROJECT_TENDER WHERE PROJECT_NAME IN (SELECT XMMC FROM API_SJCS_XMBDB)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_PROJECT_TENDER (\n" +
                    "    PROJECT_NAME,    -- 项目名称\n" +
                    "    TENDER_NAME,     -- 招标名称\n" +
                    "    TYPE,            -- 类型\n" +
                    "    CONTRACTING_UNIT,-- 承包单位\n" +
                    "    TENDER_CODE      -- 标段编号\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC,  -- 项目名称\n" +
                    "    BDMC,  -- 招标名称\n" +
                    "    BDLX,  -- 类型\n" +
                    "    ZBDW,  -- 承包单位\n" +
                    "    NULL   -- 标段编号\n" +
                    "FROM API_SJCS_XMBDB;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private ISjcsXmsgxxbService iSjcsXmsgxxbService;

    @Override
    public void GHSGXX() {
        doTask("项目施工信息表","API_SJCS_XMSGXXB",GHSGXXUrl,GHSGXXToken,orgCode,500,500,null,null,iSjcsXmsgxxbService,SjcsXmsgxxb.class);
        try {
            String deleteSql = "DELETE FROM API_PROJECT_CONSTRUCTION_INFO WHERE PROJECTNAME IN (SELECT XMMC FROM API_SJCS_XMSGXXB)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_PROJECT_CONSTRUCTION_INFO (\n" +
                    "    PROJECTCODE,                  -- 项目编号\n" +
                    "    PARAGRAPHNAME,                -- 标段名称\n" +
                    "    PARAGRAPHID,                  -- 标段编号\n" +
                    "    FZDANWEI,                     -- 负责单位（指挥部）\n" +
                    "    XMFUZEREN,                    -- 负责人\n" +
                    "    PERSONPHONE,                  -- 负责人联系方式\n" +
                    "    JGDANWEI,                     -- 监管单位\n" +
                    "    JLDANWEI,                     -- 监理单位\n" +
                    "    JLFUZEREN,                    -- 监理单位负责人\n" +
                    "    SGDANWEI,                     -- 施工单位\n" +
                    "    CONSTRUCTIONUNITCODE,         -- 施工单位代码\n" +
                    "    CONSTRUCTIONUNITPERSON,       -- 施工单位负责人\n" +
                    "    CONSTRUCTIONUNITPERSONCONTACT,-- 施工单位负责人联系方式\n" +
                    "    CONSTRUCTIONUNITLEADERIDCARD, -- 施工单位负责人身份证号\n" +
                    "    XGFILE,                       -- 质量报监等相关材料\n" +
                    "    CONSTRUCTIONSBFILE,           -- 施工许可申报材料\n" +
                    "    CONSTRUCTIONXKZ,              -- 施工许可证\n" +
                    "    KAIGONGSHIJIAN,               -- 开工时间\n" +
                    "    JIHUAJUNGONGRIQI,             -- 计划竣工日期\n" +
                    "    JIHUAWANCHENGSHIJIAN,         -- 计划完成时间\n" +
                    "    JIANSHEZHOUQI,                -- 建设周期\n" +
                    "    SHENPICAILIAO,                -- 审批材料（文件名 另提供附件）\n" +
                    "    SHIGONGHETONGWENJIAN,         -- 施工合同文件（文件名 另提供附件）\n" +
                    "    SHIGONGJINDU,                 -- 施工进度\n" +
                    "    ISSUBPACKAGE,                 -- 是否可以分包\n" +
                    "    Sectiontype,                  -- 标段类型\n" +
                    "    SectionConstruction,          -- 标段施工范围\n" +
                    "    ConstructionTime,             -- 施工许可申报时间\n" +
                    "    ConstructionpermitTime,       -- 施工许可证时间\n" +
                    "    SUPERVISION_SUPERVISOR,       -- 监理负责人\n" +
                    "    CONSTRUCTIONPERMIT,           -- 施工许可批复单位\n" +
                    "    temp_time,                    -- 临时时间字段\n" +
                    "    temp_kaigongshijian,          -- 临时开工时间\n" +
                    "    temp_jihuajungongriqi,        -- 临时计划竣工日期\n" +
                    "    temp_jihuawanChengshijian,    -- 临时计划完成时间\n" +
                    "    PROJECTNAME,                  -- 名称\n" +
                    "    totalProgress,                -- 精度\n" +
                    "    FILENAME                      -- 文件中文名\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMBH, -- 项目编号\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    FZDW, -- 负责单位（指挥部）\n" +
                    "    FZR, -- 负责人\n" +
                    "    NULL, -- 负责人联系方式\n" +
                    "    NULL, -- 监管单位\n" +
                    "    NULL, -- 监理单位\n" +
                    "    JLFZR, -- 监理单位负责人\n" +
                    "    SGDW, -- 施工单位\n" +
                    "    NULL, -- 施工单位代码\n" +
                    "    SGDWXCFZR, -- 施工单位负责人\n" +
                    "    NULL, -- 施工单位负责人联系方式\n" +
                    "    NULL, -- 施工单位负责人身份证号\n" +
                    "    NULL, -- 质量报监等相关材料\n" +
                    "    NULL, -- 施工许可申报材料\n" +
                    "    NULL, -- 施工许可证\n" +
                    "    KGSJ, -- 开工时间\n" +
                    "    JHJGSJ, -- 计划竣工日期\n" +
                    "    JHWGSJ, -- 计划完成时间\n" +
                    "    JSZQ, -- 建设周期\n" +
                    "    NULL, -- 审批材料（文件名 另提供附件）\n" +
                    "    NULL, -- 施工合同文件（文件名 另提供附件）\n" +
                    "    NULL, -- 施工进度\n" +
                    "    NULL, -- 是否可以分包\n" +
                    "    NULL, -- 标段类型\n" +
                    "    BDSGFW, -- 标段施工范围\n" +
                    "    NULL, -- 施工许可申报时间\n" +
                    "    NULL, -- 施工许可证时间\n" +
                    "    JDFZR, -- 监督负责人\n" +
                    "    NULL, -- 施工许可批复单位\n" +
                    "    NULL, -- 临时时间字段\n" +
                    "    NULL, -- 临时开工时间\n" +
                    "    NULL, -- 临时计划竣工日期\n" +
                    "    NULL, -- 临时计划完成时间\n" +
                    "    XMMC, -- 名称\n" +
                    "    NULL, -- 精度\n" +
                    "    NULL  -- 文件中文名\n" +
                    "FROM API_SJCS_XMSGXXB;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IBJsQiyjbxxService iBJsQiyjbxxService;

    @Override
    public void QYJBXX() {
        doTask("企业基本信息","API_B_JS_QIYJBXX",QYJBXXUrl,QYJBXXToken,orgCode,500,500,null,null,iBJsQiyjbxxService,BJsQiyjbxx.class);
    }

    @Resource
    private ISjcsGkpfxxService iSjcsGkpfxxService;

    @Override
    public void GHGKPF() {
        doTask("工可批复信息","API_SJCS_GKPFXX",GHGKPFUrl,GHGKPFToken,orgCode,500,500,null,null,iSjcsGkpfxxService,SjcsGkpfxx.class);
        try {
            String deleteSql = "DELETE FROM API_PROJECT_FEASIBILITY WHERE PROJECT_NAME IN (SELECT XMMC FROM API_SJCS_GKPFXX)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_PROJECT_FEASIBILITY (\n" +
                    "    PROJECT_NAME,               -- 项目名称\n" +
                    "    PROJECT_CODE,               -- 项目编号\n" +
                    "    APPLY_UNIT,                 -- 申报单位\n" +
                    "    APPLY_LEADER,               -- 申报负责人\n" +
                    "    LEADER_CONTACT,             -- 负责人联系方式\n" +
                    "    LEADER_ID_CARD,             -- 负责人身份证号\n" +
                    "    BIDDING_METHOD,             -- 招标方式\n" +
                    "    BIDDING_DOCUMENT,           -- 招标文件(文件名 另提供附件)\n" +
                    "    FEASIBILITY_UNIT,           -- 可行性报告编制单位\n" +
                    "    UNIT_CONTACT_PERSON,        -- 编制单位联系人\n" +
                    "    CONTACT_PHONE,              -- 联系方式\n" +
                    "    CONTACT_ID_CARD,            -- 身份证号\n" +
                    "    CONSULTING_UNIT,            -- 工可咨询单位（铁路必填）\n" +
                    "    CONSULTING_CONTACT_PERSON,  -- 咨询单位联系人\n" +
                    "    CONSULTING_CONTACT_PHONE,   -- 联系人联系方式\n" +
                    "    CONSULTING_ID_CARD,         -- 联系人身份证号\n" +
                    "    FEASIBILITY_DOCUMENT,       -- 工可文件(文件名 另提供附件)\n" +
                    "    APPROVAL_DATE,              -- 批复时间\n" +
                    "    APPROVAL_DOCUMENT,          -- 批复文件\n" +
                    "    APPROVAL_NUMBER,            -- 批复文号\n" +
                    "    BIDYAOQIU,                  -- 招标要求\n" +
                    "    APPROVAL_UNIT,              -- 批复单位\n" +
                    "    FILENAME                    -- 文件中文名\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC,  -- 项目名称\n" +
                    "    XMBH,  -- 项目编号\n" +
                    "    NULL,  -- 申报单位\n" +
                    "    NULL,  -- 申报负责人\n" +
                    "    NULL,  -- 负责人联系方式\n" +
                    "    NULL,  -- 负责人身份证号\n" +
                    "    NULL,  -- 招标方式\n" +
                    "    NULL,  -- 招标文件(文件名 另提供附件)\n" +
                    "    GKBZDW,  -- 可行性报告编制单位\n" +
                    "    GKBZDWFZR,  -- 编制单位联系人\n" +
                    "    NULL,  -- 联系方式\n" +
                    "    NULL,  -- 身份证号\n" +
                    "    NULL,  -- 工可咨询单位（铁路必填）\n" +
                    "    NULL,  -- 咨询单位联系人\n" +
                    "    NULL,  -- 联系人联系方式\n" +
                    "    NULL,  -- 联系人身份证号\n" +
                    "    NULL,  -- 工可文件(文件名 另提供附件)\n" +
                    "    PFSJ,  -- 批复时间\n" +
                    "    PFWJFWDZ,  -- 批复文件\n" +
                    "    PFWH,  -- 批复文号\n" +
                    "    NULL,  -- 招标要求\n" +
                    "    PFDW,  -- 批复单位\n" +
                    "    PFWJMC   -- 文件中文名\n" +
                    "FROM API_SJCS_GKPFXX;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private ISjcsSgtsjpfService iSjcsSgtsjpfService;

    @Override
    public void GHSGTSJ() {
        doTask("施工图设计批复","API_SJCS_SGTSJPF",GHSGTSJUrl,GHSGTSJToken,orgCode,500,500,null,null,iSjcsSgtsjpfService,SjcsSgtsjpf.class);
        try {
            String deleteSql = "DELETE FROM API_CONSTRUCTION_DRAWING_DESIGN WHERE projectname in (select xmmc from API_SJCS_SGTSJPF)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_CONSTRUCTION_DRAWING_DESIGN (\n" +
                    "    PROJECTNAME,                -- 项目名称\n" +
                    "    PROJECTCODE,                -- 项目编号\n" +
                    "    PARAGRAPHNAME,              -- 标段名称\n" +
                    "    PARAGRAPHNUMBER,            -- 标段号\n" +
                    "    DESIGN_DEPT_HEAD,           -- 设计管理部门负责人\n" +
                    "    DESIGN_DEPARTMENT,          -- 设计管理部门\n" +
                    "    HEAD_CONTACT,               -- 负责人联系方式\n" +
                    "    HEAD_IDCARD,                -- 负责人身份证号\n" +
                    "    DESIGNUNIT,                 -- 设计单位\n" +
                    "    DESIGN_HEAD,                -- 设计负责人\n" +
                    "    DESIGN_HEAD_CONTACT,        -- 设计负责人联系方式\n" +
                    "    DESIGN_HEAD_IDCARD,         -- 设计负责人身份证号\n" +
                    "    CONSULTINGUNIT,             -- 咨询单位\n" +
                    "    CONSULTING_HEAD,            -- 咨询负责人\n" +
                    "    CONSULTING_HEAD_CONTACT,    -- 咨询负责人联系方式\n" +
                    "    CONSULTING_HEAD_IDCARD,     -- 咨询负责人身份证号\n" +
                    "    SURVEY_CONTENT,             -- 勘察内容 (关键内容)\n" +
                    "    SURVEY_DESIGN_FILE,         -- 勘察设计文件 (文件名 另提供附件)\n" +
                    "    CONSTRUCTION_DRAWING_PLAN,  -- 施工图设计方案 (文件名 另提供附件)\n" +
                    "    BUDGET,                     -- 预算（亿）\n" +
                    "    FILING_APPLICATION_FORM,    -- 备案申请表 (文件名 另提供附件)\n" +
                    "    FILING_APPLICATION_TIME,    -- 备案申请时间\n" +
                    "    FILING_APPROVAL_TIME,       -- 备案通过时间\n" +
                    "    APPROVAL_DOCUMENT,          -- 批复文件 (文件名 另提供附件)\n" +
                    "    APPROVAL_TIME,              -- 批复时间\n" +
                    "    APPROVAL_UNIT,              -- 批复单位\n" +
                    "    APPROVAL_DOC_NUMBER,        -- 批复文号\n" +
                    "    ConferenceName,             -- 会议名称\n" +
                    "    FILENAME                    -- 文件中文名\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC,  -- 项目名称\n" +
                    "    XMBH,  -- 项目编号\n" +
                    "    NULL,  -- 标段名称\n" +
                    "    NULL,  -- 标段号\n" +
                    "    NULL,  -- 设计管理部门负责人\n" +
                    "    NULL,  -- 设计管理部门\n" +
                    "    NULL,  -- 负责人联系方式\n" +
                    "    NULL,  -- 负责人身份证号\n" +
                    "    SJDW,  -- 设计单位\n" +
                    "    SJDWFZR,  -- 设计负责人\n" +
                    "    NULL,  -- 设计负责人联系方式\n" +
                    "    NULL,  -- 设计负责人身份证号\n" +
                    "    NULL,  -- 咨询单位\n" +
                    "    NULL,  -- 咨询负责人\n" +
                    "    NULL,  -- 咨询负责人联系方式\n" +
                    "    NULL,  -- 咨询负责人身份证号\n" +
                    "    NULL,  -- 勘察内容 (关键内容)\n" +
                    "    NULL,  -- 勘察设计文件 (文件名 另提供附件)\n" +
                    "    NULL,  -- 施工图设计方案 (文件名 另提供附件)\n" +
                    "    NULL,  -- 预算（亿）\n" +
                    "    NULL,  -- 备案申请表 (文件名 另提供附件)\n" +
                    "    NULL,  -- 备案申请时间（DATE类型，可留空）\n" +
                    "    NULL,  -- 备案通过时间（DATE类型，可留空）\n" +
                    "    PFWJFWDZ,  -- 批复文件 (文件名 另提供附件)\n" +
                    "    PFSJ,  -- 批复时间（DATE类型，可留空）\n" +
                    "    PFDW,  -- 批复单位\n" +
                    "    PFWH,  -- 批复文号\n" +
                    "    NULL,  -- 会议名称（CHAR(255)，NULL不占长度）\n" +
                    "    PFWJMC   -- 文件中文名\n" +
                    "FROM API_SJCS_SGTSJPF;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private ISjcsZtbxxService iSjcsZtbxxService;

    @Override
    public void GHZTBXX() {
        doTask("招投标信息","API_SJCS_ZTBXX",GHZTBXXUrl,GHZTBXXToken,orgCode,500,500,null,null,iSjcsZtbxxService,SjcsZtbxx.class);
        try {
            String deleteSql = "DELETE FROM API_TENDER_PROJECT_INFO WHERE PROJECT_NAME IN (SELECT XMMC FROM API_SJCS_ZTBXX)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_TENDER_PROJECT_INFO (\n" +
                    "    PROJECT_NAME,               -- 项目名称（非空，必须赋值）\n" +
                    "    PROJECT_CODE,               -- 项目编号（可空）\n" +
                    "    SECTION_NAME,               -- 标段名称（可空）\n" +
                    "    SECTION_CODE,               -- 标段编号（可空）\n" +
                    "    TENDERING_UNIT,             -- 招标单位（可空）\n" +
                    "    TENDERING_METHOD,           -- 招标方式（可空）\n" +
                    "    TENDER_AGENCY,              -- 招标代理单位（可空）\n" +
                    "    TENDER_NOTICE_PUBLISH_TIME, -- 招标公告发布时间（可空）\n" +
                    "    WINNING_UNIT,               -- 中标单位（可空）\n" +
                    "    CONTRACT_FILE_NAME,         -- 合同文件名称（可空）\n" +
                    "    CONTRACT_FILE_URL           -- 合同文件访问地址（可空）\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC,  -- 非空字段：必须替换为实际名称（如'XX公路新建项目'）\n" +
                    "    XMBH,  -- 项目编号：可保留NULL\n" +
                    "    BDMC,  -- 标段名称：可保留NULL\n" +
                    "    BDBH,  -- 标段编号：可保留NULL\n" +
                    "    ZBDW1,  -- 招标单位：可保留NULL\n" +
                    "    ZBFS,  -- 招标方式：可保留NULL\n" +
                    "    ZBDLDW,  -- 招标代理单位：可保留NULL\n" +
                    "    ZBGGFBSJ,  -- 发布时间：可保留NULL（后续填'YYYY-MM-DD'格式）\n" +
                    "    ZBDW2,  -- 中标单位：可保留NULL\n" +
                    "    HTWJMC,  -- 合同名称：可保留NULL\n" +
                    "    HTWJFWDZ   -- 合同地址：可保留NULL\n" +
                    "FROM API_SJCS_ZTBXX;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private ISjcsSgxkbService iSjcsSgxkbService;

    @Override
    public void GHSGXK() {
        doTask("施工许可表","API_SJCS_SGXKB",GHSGXKUrl,GHSGXKToken,orgCode,500,500,null,null,iSjcsSgxkbService,SjcsSgxkb.class);
        try {
            String deleteSql = "DELETE FROM API_CONSTRUCTION_PERMIT WHERE PROJECT_NAME IN (SELECT XMMC FROM API_SJCS_SGXKB)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_CONSTRUCTION_PERMIT (\n" +
                    "    PROJECT_NAME,               -- 项目名称（非空，必须替换）\n" +
                    "    PROJECT_CODE,               -- 项目编号（非空，必须替换）\n" +
                    "    CONSTRUCTION_APPROVAL_UNIT, -- 施工许可批复单位（可空）\n" +
                    "    CONSTRUCTION_PERMIT_FILE,   -- 施工许可证索引地址（可空）\n" +
                    "    CONSTRUCTION_PERMIT_DATE,   -- 施工许可证时间（可空）\n" +
                    "    FILENAME                    -- 文件中文名（可空）\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC,  -- 非空字段：如'XX快速路建设项目'（≤255位）\n" +
                    "    XMBH,  -- 非空字段：如'XM202409001'（≤50位）\n" +
                    "    SGXKPFDW,  -- 施工许可批复单位：可保留NULL\n" +
                    "    SGXKZFWDZ,  -- 施工许可证索引地址：可保留NULL\n" +
                    "    SGXKZSJ,  -- 施工许可证时间：可保留NULL（后续填TO_DATE('2024-09-01','YYYY-MM-DD')）\n" +
                    "    SGXKZMC   -- 文件中文名：可保留NULL\n" +
                    "FROM API_SJCS_SGXKB;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Override
    public void XMJBXXTB() {
        try {
            String updateSql = "UPDATE DIMENMODEL.API_PROJECT_INFO P SET P.SPTIME=TO_DATE(P.APPROVAL_DATE,'YYYY-MM-DD');\n" +
                    "UPDATE DIMENMODEL.API_PROJECT_INFO P SET P.SPEND = ADD_MONTHS(P.SPTIME, 24) WHERE P.SPTIME IS NOT NULL;";
            int insert = jdbcTemplate.update(updateSql);
            log.info("执行各单位审批时间、审批有效期数据，同步{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private ISjcsFblwwbglbService iSjcsFblwwbglbService;

    @Override
    public void GHFBGLB() {
        doTask("分包/劳务外包管理","API_SJCS_FBLWWBGLB",GHFBGLBUrl,GHFBGLBToken,orgCode,500,500,null,null,iSjcsFblwwbglbService,SjcsFblwwbglb.class);
        try {
            String deleteSql = "DELETE FROM API_SUBCONTRACT_MANAGEMENT WHERE PROJECT_NAME IN (SELECT XMMC FROM API_SJCS_FBLWWBGLB)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_SUBCONTRACT_MANAGEMENT (\n" +
                    "    PROJECT_NAME,                -- 项目名称\n" +
                    "    PROJECT_CODE,                -- 项目编号\n" +
                    "    SECTION_NAME,                -- 标段名称\n" +
                    "    SECTION_CODE,                -- 标段编号\n" +
                    "    CONTRACTOR,                  -- 承包单位\n" +
                    "    CONTRACT_TYPE,               -- 类型(分包/劳务外包)（仅允许这两个值）\n" +
                    "    SUBCONTRACT_PROJECT,         -- 分包/外包工程\n" +
                    "    SUBCONTRACT_COMPANY,         -- 分包/劳务外包单位\n" +
                    "    APPROVAL_MATERIAL,           -- 报批材料(文件名 另提供附件)\n" +
                    "    APPROVAL_FILE,               -- 批复文件(文件名 另提供附件)\n" +
                    "    APPROVAL_DATE,               -- 批复时间\n" +
                    "    CONTRACT_FILE,               -- 分包/外包合同(文件名 另提供附件)\n" +
                    "    CONTRACT_RECORD_FILE,        -- 合同备案(文件名 另提供附件)\n" +
                    "    CREATE_TIME,                 -- 创建时间\n" +
                    "    UPDATE_TIME,                 -- 更新时间\n" +
                    "    CONTRACT_RECORD_ID,          -- 分包/外包合同编号\n" +
                    "    ApprovalUnit,                -- 批复单位\n" +
                    "    SubcontractingUnitCode,      -- 分包单位代码\n" +
                    "    Subcontractor,               -- 分包单位\n" +
                    "    QualificationDocuments,      -- 分包单位资质文件\n" +
                    "    LegalPerson,                 -- 法人\n" +
                    "    LegalContactInformation,     -- 法人联系方式\n" +
                    "    SiteSupervisor,              -- 分包单位现场负责人\n" +
                    "    ContactInformation,           -- 分包单位现场负责人联系方式\n" +
                    "\tFILENAME,\n" +
                    "\tHTFILENAME\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC, -- 项目名称\n" +
                    "    XMBH, -- 项目编号\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    CBDW, -- 承包单位\n" +
                    "    LX, -- 类型(分包/劳务外包)（后续需填'分包'或'劳务外包'，否则违反CHECK约束）\n" +
                    "    FBWBGC, -- 分包/外包工程\n" +
                    "    FBWBDW, -- 分包/劳务外包单位\n" +
                    "    NULL, -- 报批材料(文件名 另提供附件)\n" +
                    "    PFWJFWDZ, -- 批复文件(文件名 另提供附件)\n" +
                    "    PFSJ, -- 批复时间（DATE类型，后续填TO_DATE('2024-11-10','YYYY-MM-DD')）\n" +
                    "    FBWBHT, -- 分包/外包合同(文件名 另提供附件)\n" +
                    "    NULL, -- 合同备案(文件名 另提供附件)\n" +
                    "    NULL, -- 创建时间（DATE类型，后续填TO_DATE('2024-11-01','YYYY-MM-DD')）\n" +
                    "    NULL, -- 更新时间（DATE类型，后续填TO_DATE('2024-11-02','YYYY-MM-DD')）\n" +
                    "    NULL, -- 分包/外包合同编号\n" +
                    "    PFDW, -- 批复单位\n" +
                    "    NULL, -- 分包单位代码\n" +
                    "    NULL, -- 分包单位\n" +
                    "    NULL, -- 分包单位资质文件\n" +
                    "    NULL, -- 法人\n" +
                    "    NULL, -- 法人联系方式\n" +
                    "    FBWBDWLXR, -- 分包单位现场负责人\n" +
                    "    NULL,  -- 分包单位现场负责人联系方式\n" +
                    "\tPFWJMC,\n" +
                    "\tFBWBHTMC\n" +
                    "FROM API_SJCS_FBLWWBGLB;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private ISjcsZlglbService iSjcsZlglbService;

    @Override
    public void GHZLGLB() {
        doTask("质量管理表","API_SJCS_ZLGLB",GHZLGLBUrl,GHZLGLBToken,orgCode,500,500,null,null,iSjcsZlglbService,SjcsZlglb.class);
        try {
            String deleteSql = "DELETE FROM API_QUALITY_MANAGEMENT WHERE PROJECT_NAME IN (SELECT XMMC FROM API_SJCS_ZLGLB)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_QUALITY_MANAGEMENT (\n" +
                    "    PROJECT_NAME,                -- 项目名称\n" +
                    "    PROJECT_CODE,                -- 项目编号\n" +
                    "    SECTION_NAME,                -- 标段名称\n" +
                    "    SECTION_CODE,                -- 标段编号\n" +
                    "    YEAR,                        -- 年份\n" +
                    "    INSPECTION_PLAN_FILE,        -- 年度检查计划(文件名 另提供附件)\n" +
                    "    INSPECTION_UNIT,             -- 检查单位（执法局、交建局治安处）\n" +
                    "    INSPECTION_LEADER,           -- 检查负责人\n" +
                    "    LEADER_CONTACT,              -- 负责人联系方式\n" +
                    "    INSPECTION_DATE,             -- 检查时间\n" +
                    "    ANNUAL_PROGRESS,             -- 年进度\n" +
                    "    INSPECTION_RECORD_FILE,      -- 检验记录文件（文件名 另提供附件）\n" +
                    "    HAS_PROBLEM,                 -- 是否存在问题\n" +
                    "    PROBLEM_DESCRIPTION,         -- 问题描述\n" +
                    "    RECTIFICATION_REQUIREMENT_FILE, -- 整改要求(文件名 另提供附件)\n" +
                    "    IS_RECTIFICATION_CONFIRMED,  -- 整改后是否确认\n" +
                    "    RECTIFICATION_REPORT_DATE,   -- 问题整改材料上报时间\n" +
                    "    RECTIFICATION_MATERIAL_FILE, -- 问题整改材料(文件名 另提供附件)\n" +
                    "    IS_PROBLEM_SOLVED,           -- 问题是否解决\n" +
                    "    YCLHGL,                       -- 原材料抽检合格率\n" +
                    "\tWTFILENAME,\n" +
                    "\tZGFILENAME\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC, -- 项目名称\n" +
                    "    XMBH, -- 项目编号\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    NULL, -- 年份（VARCHAR2(4)，后续填如'2024'）\n" +
                    "    NULL, -- 年度检查计划(文件名 另提供附件)\n" +
                    "    JCDW, -- 检查单位（执法局、交建局治安处）\n" +
                    "    JCFZR, -- 检查负责人\n" +
                    "    NULL, -- 负责人联系方式（VARCHAR2(20)，填手机号或固话）\n" +
                    "    JCSJ, -- 检查时间（格式如'2024-11-20'）\n" +
                    "    NULL, -- 年进度（如'85%'）\n" +
                    "    NULL, -- 检验记录文件（文件名 另提供附件）\n" +
                    "    SFCZWT, -- 是否存在问题（VARCHAR2(2)，建议填'是'/'否'）\n" +
                    "    WTZGCLMC, -- 问题描述（VARCHAR2(1000)，支持长文本）\n" +
                    "    NULL, -- 整改要求(文件名 另提供附件)\n" +
                    "    NULL, -- 整改后是否确认（如'已确认'/'未确认'）\n" +
                    "    WTZGCLSBSJ, -- 问题整改材料上报时间（格式如'2024-11-25'）\n" +
                    "    WTZGCLFWDZ, -- 问题整改材料(文件名 另提供附件)\n" +
                    "    NULL, -- 问题是否解决（VARCHAR2(2)，建议填'是'/'否'）\n" +
                    "    NULL,  -- 原材料抽检合格率（如'98.5%'）\n" +
                    "\tWTMSWJMC,\n" +
                    "\tWTZGCLMC\n" +
                    "FROM API_SJCS_ZLGLB;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private ISjcsAqglbService iSjcsAqglbService;

    @Override
    public void GHZLAQB() {
        doTask("安全管理表","API_SJCS_AQGLB",GHZLAQBUrl,GHZLAQBToken,orgCode,500,500,null,null,iSjcsAqglbService,SjcsAqglb.class);
        try {
            String deleteSql = "DELETE FROM API_SAFETY_MANAGEMENT WHERE PROJECT_NAME IN (SELECT XMMC FROM API_SJCS_AQGLB)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_SAFETY_MANAGEMENT (\n" +
                    "    PROJECT_NAME,                -- 项目名称（非空，必须替换）\n" +
                    "    PROJECT_CODE,                -- 项目编号\n" +
                    "    SECTION_NAME,                -- 标段名称\n" +
                    "    SECTION_CODE,                -- 标段编号\n" +
                    "    YEAR,                        -- 年份（非空，必须替换）\n" +
                    "    INSPECTION_PLAN,             -- 年度检查计划\n" +
                    "    INSPECTION_UNIT,             -- 检查单位(执法局、交建局治安处)\n" +
                    "    INSPECTION_LEADER,           -- 检查负责人\n" +
                    "    LEADER_CONTACT,              -- 负责人联系方式\n" +
                    "    INSPECTION_DATE,             -- 检查时间\n" +
                    "    ANNUAL_PROGRESS,             -- 年进度\n" +
                    "    INSPECTION_RECORD_FILE,      -- 检验记录文件\n" +
                    "    HAS_PROBLEM,                 -- 是否存在问题(是非空，必须替换)\n" +
                    "    PROBLEM_DESCRIPTION,         -- 问题描述\n" +
                    "    SAFETY_MANAGEMENT_INDEX,     -- 安全管理指数\n" +
                    "    RECTIFICATION_REQUIREMENT,   -- 整改要求(文件名 另提供附件)\n" +
                    "    IS_RECTIFICATION_CONFIRMED,  -- 整改后是否确认(是非空，必须替换)\n" +
                    "    RECTIFICATION_MATERIAL,      -- 问题整改材料\n" +
                    "    RECTIFICATION_REPORT_DATE,   -- 问题整改材料上报时间\n" +
                    "    IS_PROBLEM_SOLVED,            -- 问题是否解决(是非空，必须替换)\n" +
                    "\tMSFILENAME,\n" +
                    "\tZGFILENAME\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC, -- 项目名称（非空，必须替换为实际名称，如'XX隧道建设项目'）\n" +
                    "    XMBH, -- 项目编号\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    NULL, -- 年份（非空，必须替换为4位字符串，如'2024'）\n" +
                    "    NULL, -- 年度检查计划\n" +
                    "    JCDW, -- 检查单位(执法局、交建局治安处)\n" +
                    "    JCFZR, -- 检查负责人\n" +
                    "    NULL, -- 负责人联系方式（VARCHAR2(20)，填手机号或固话）\n" +
                    "    JCSJ, -- 检查时间（格式如'2024-12-05'）\n" +
                    "    NULL, -- 年进度（如'90%'）\n" +
                    "    NULL, -- 检验记录文件\n" +
                    "    SFCZWT, -- 是否存在问题(是非空，必须替换为'是'或'否'，VARCHAR2(1)需注意长度)\n" +
                    "    WTMS, -- 问题描述（VARCHAR2(1000)，支持长文本）\n" +
                    "    NULL, -- 安全管理指数（NUMBER(5,2)，如95.75）\n" +
                    "    NULL, -- 整改要求(文件名 另提供附件)\n" +
                    "    NULL, -- 整改后是否确认(是非空，必须替换，如'已确认'/'未确认')\n" +
                    "    WTZGCL, -- 问题整改材料\n" +
                    "    WTZGCLSBSJ, -- 问题整改材料上报时间（DATE类型，填TO_DATE('2024-12-10','YYYY-MM-DD')）\n" +
                    "    NULL,  -- 问题是否解决(是非空，必须替换为'已解决'/'未解决')\n" +
                    "\tWTMSWJMC,\n" +
                    "\tWTZGCLMC\n" +
                    "FROM API_SJCS_AQGLB;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private ISjcsGzsjxxService iSjcsGzsjxxService;

    @Override
    public void GHGZSJ() {
        doTask("跟踪审计信息","API_SJCS_GZSJXX",GHGZSJUrl,GHGZSJToken,orgCode,500,500,null,null,iSjcsGzsjxxService,SjcsGzsjxx.class);
        try {
            String deleteSql = "DELETE FROM API_Auditing_Info WHERE PROJECT_NAME IN (SELECT XMMC FROM API_SJCS_GZSJXX)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_Auditing_Info (\n" +
                    "    Project_No,                  -- 项目编号\n" +
                    "    Bid_Section_No,              -- 标段编号\n" +
                    "    Bid_Section_Name,            -- 标段名称\n" +
                    "    Auditing_Unit,               -- 审计单位\n" +
                    "    Auditing_Responsible_Person, -- 审计负责人员\n" +
                    "    Auditing_Content,            -- 审计内容\n" +
                    "    Auditing_Time,               -- 审计时间\n" +
                    "    Auditing_Report,             -- 审计报告\n" +
                    "    PROJECT_NAME,                 -- 项目名称\n" +
                    "\tFILENAME\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMBH, -- 项目编号\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    SJDW, -- 审计单位\n" +
                    "    SJFZRY, -- 审计负责人员\n" +
                    "    SJNR, -- 审计内容\n" +
                    "    SJSJ, -- 审计时间（格式如'2024-12-10'或'2024年12月'）\n" +
                    "    SJBGFWDZ, -- 审计报告（文件名，另提供附件）\n" +
                    "    XMMC,  -- 项目名称（VARCHAR2(50)，长度≤50位）\n" +
                    "\tSJBGMC\n" +
                    "FROM API_SJCS_GZSJXX;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private ISjcsJlsxxxService iSjcsJlsxxxService;

    @Override
    public void GHJLSX() {
        doTask("监理事项信息","API_SJCS_JLSXXX",GHJLSXUrl,GHJLSXToken,orgCode,500,500,null,null,iSjcsJlsxxxService,SjcsJlsxxx.class);
        try {
            String deleteSql = "DELETE FROM API_Supervision_Info WHERE PROJECTNAME IN (SELECT XMMC FROM API_SJCS_JLSXXX)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_Supervision_Info (\n" +
                    "    Project_Number,               -- 项目编号\n" +
                    "    Bid_Section_Number,           -- 标段编号\n" +
                    "    Bid_Section_Name,             -- 标段名称\n" +
                    "    Supervision_Unit,             -- 监理单位\n" +
                    "    Supervision_Responsible_Person, -- 监理负责人\n" +
                    "    Supervision_Report,           -- 监理报告\n" +
                    "    PROJECTNAME,                  -- 项目名称\n" +
                    "    FILENAME                      -- 文件中文名\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMBH, -- 项目编号\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    JLDW, -- 监理单位\n" +
                    "    JLFZR, -- 监理负责人\n" +
                    "    JLBGFWDZ, -- 监理报告（文件名，另提供附件）\n" +
                    "    XMMC, -- 项目名称（VARCHAR2(50)，长度≤50位）\n" +
                    "    JLBGMC  -- 文件中文名（VARCHAR2(50)，长度≤50位）\n" +
                    "FROM API_SJCS_JLSXXX;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private ISjcsJgysb1Service iSjcsJgysb1Service;

    @Override
    public void GHJGYS() {
        doTask("交工验收表","API_SJCS_JGYSB1",GHJGYSUrl,GHJGYSToken,orgCode,500,500,null,null,iSjcsJgysb1Service,SjcsJgysb1.class);
        try {
            String deleteSql = "DELETE FROM API_HANDOVER_ACCEPTANCE WHERE PROJECT_NAME IN (SELECT XMMC FROM API_SJCS_JGYSB1)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_HANDOVER_ACCEPTANCE (\n" +
                    "    PROJECT_NAME,                -- 项目名称（非空，必须替换）\n" +
                    "    PROJECT_CODE,                -- 项目编号（非空，必须替换）\n" +
                    "    SECTION_NAME,                -- 标段名称\n" +
                    "    SECTION_CODE,                -- 标段编号\n" +
                    "    ACCEPTANCE_UNIT,             -- 验收单位（非空，必须替换）\n" +
                    "    ACCEPTANCE_TIME,             -- 验收时间（非空，必须替换）\n" +
                    "    VERIFICATION_REPORT_NAME,    -- 核验报告名称（非空，必须替换）\n" +
                    "    VERIFICATION_REPORT_URL,     -- 核验报告访问地址（非空，必须替换）\n" +
                    "    ACCEPTANCE_REPORT_NAME,      -- 验收报告名称（非空，必须替换）\n" +
                    "    ACCEPTANCE_REPORT_URL        -- 验收报告访问地址（非空，必须替换）\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC, -- 项目名称（非空，≤200位，如'XX市政道路新建工程'）\n" +
                    "    XMBH, -- 项目编号（非空，≤100位，如'XM202412001'）\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    YSDW, -- 验收单位（非空，≤200位，如'XX市交通工程质量监督站'）\n" +
                    "    YSSJ, -- 验收时间（非空，DATE类型，填TO_DATE('2024-12-20','YYYY-MM-DD')）\n" +
                    "    HYBGMC, -- 核验报告名称（非空，≤300位，如'XX道路工程质量核验报告.pdf'）\n" +
                    "    HYBGFWDZ, -- 核验报告访问地址（非空，≤500位，如'http://file.example.com/verify/20241220.pdf'）\n" +
                    "    YSBGMC, -- 验收报告名称（非空，≤300位，如'XX道路工程交工验收报告.pdf'）\n" +
                    "    YSBGFWDZ  -- 验收报告访问地址（非空，≤500位，如'http://file.example.com/accept/20241220.pdf'）\n" +
                    "FROM API_SJCS_JGYSB1;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private ISjcsJgysb2Service iSjcsJgysb2Service;

    @Override
    public void GHJUNGYS() {
        doTask("竣工验收表","API_SJCS_JGYSB2",GHJUNGYSUrl,GHJUNGYSToken,orgCode,500,500,null,null,iSjcsJgysb2Service,SjcsJgysb2.class);
        try {
            String deleteSql = "DELETE FROM API_FINAL_ACCEPTANCE WHERE PROJECT_NAME IN (SELECT XMMC FROM API_SJCS_JGYSB2)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_FINAL_ACCEPTANCE (\n" +
                    "    PROJECT_NAME,                -- 项目名称（非空，必须替换）\n" +
                    "    PROJECT_CODE,                -- 项目编号（非空，必须替换）\n" +
                    "    SECTION_NAME,                -- 标段名称\n" +
                    "    SECTION_CODE,                -- 标段编号\n" +
                    "    ACCEPTANCE_UNIT,             -- 验收单位（非空，必须替换）\n" +
                    "    ACCEPTANCE_TIME,             -- 验收时间（非空，必须替换）\n" +
                    "    ACCEPTANCE_REPORT_NAME,      -- 验收报告名称（非空，必须替换）\n" +
                    "    ACCEPTANCE_REPORT_URL,       -- 验收报告访问地址（非空，必须替换）\n" +
                    "    AUDIT_REPORT_NAME,           -- 审计报告名称（非空，必须替换）\n" +
                    "    AUDIT_REPORT_URL             -- 审计报告访问地址（非空，必须替换）\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC, -- 项目名称（非空，≤200位，如'XX跨江大桥建设工程'）\n" +
                    "    XMBH, -- 项目编号（非空，≤100位，如'XM202501001'）\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    YSDW, -- 验收单位（非空，≤200位，如'XX省交通工程竣工验收委员会'）\n" +
                    "    YSSJ, -- 验收时间（非空，DATE类型，填TO_DATE('2025-01-15','YYYY-MM-DD')）\n" +
                    "    YSBGMC, -- 验收报告名称（非空，≤300位，如'XX跨江大桥竣工验收报告（终版）.pdf'）\n" +
                    "    YSBGFWDZ, -- 验收报告访问地址（非空，≤500位，如'https://file.example.com/final-accept/20250115-report.pdf'）\n" +
                    "    SJBGMC, -- 审计报告名称（非空，≤300位，如'XX跨江大桥工程竣工审计报告.pdf'）\n" +
                    "    SJBGFWDZ  -- 审计报告访问地址（非空，≤500位，如'https://file.example.com/final-audit/20250110-audit.pdf'）\n" +
                    "FROM API_SJCS_JGYSB2;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private ISjcsNmggzbService iSjcsNmggzbService;

    @Override
    public void GHZJGL() {
        doTask("农民工工资表","API_SJCS_NMGGZB",GHZJGLUrl,GHZJGLToken,orgCode,500,500,null,null,iSjcsNmggzbService,SjcsNmggzb.class);
        try {
            String deleteSql = "DELETE FROM API_Migrant_workers WHERE PK_ID IN (SELECT XMMC FROM API_SJCS_NMGGZB)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_Migrant_workers (\n" +
                    "    PK_ID,            -- 项目名称\n" +
                    "    XMID,             -- 项目编号\n" +
                    "    XMNAME,           -- 标段名称\n" +
                    "    XMBH,             -- 标段编号\n" +
                    "    NY,               -- 年月\n" +
                    "    SHDJNM,           -- 实名登记农名人数\n" +
                    "    AYZEZFRS,         -- 按月足额支付人数\n" +
                    "    LQBFSHFRS         -- 领取部分生活费人数\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC, -- 项目名称\n" +
                    "    XMBH, -- 项目编号\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    GZFFSJ, -- 年月（DATE类型，后续填TO_DATE('2024-11','YYYY-MM')）\n" +
                    "    SMDJNMRS, -- 实名登记农名人数（NUMERIC(10,0)，仅填整数，如150）\n" +
                    "    AYZEZFRS, -- 按月足额支付人数（NUMERIC(10,0)，仅填整数，如145）\n" +
                    "    LQBFSHFRS  -- 领取部分生活费人数（NUMERIC(10,0)，仅填整数，如5）\n" +
                    "FROM API_SJCS_NMGGZB;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private ISjcsBgglbService iSjcsBgglbService;

    @Override
    public void GHSJBG() {
        doTask("变更管理表","API_SJCS_BGGLB",GHSJBGUrl,GHSJBGToken,orgCode,500,500,null,null,iSjcsBgglbService,SjcsBgglb.class);
        try {
            String deleteSql = "DELETE FROM API_DESIGN_CHANGE_MANAGEMENT WHERE PROJECT_NAME IN (SELECT XMMC FROM API_SJCS_BGGLB)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_DESIGN_CHANGE_MANAGEMENT (\n" +
                    "    PROJECT_NAME,              -- 项目名称（非空，必须替换）\n" +
                    "    PROJECT_CODE,              -- 项目编号\n" +
                    "    SECTION_NAME,              -- 标段名称\n" +
                    "    SECTION_CODE,              -- 标段编号\n" +
                    "    APPLICANT_UNIT,            -- 申请变更单位\n" +
                    "    CHANGE_AMOUNT,             -- 设计变更金额(元)\n" +
                    "    CHANGE_CONTENT,            -- 设计变更内容\n" +
                    "    APPLICATION_FILE,          -- 设计变更报批文件(文件名 另提供附件)\n" +
                    "    APPLICATION_DATE,          -- 报批时间\n" +
                    "    APPROVAL_UNIT,             -- 批复单位\n" +
                    "    APPROVAL_DATE,             -- 批复时间\n" +
                    "    APPROVAL_FILE,             -- 批复文件(文件名 另提供附件)\n" +
                    "    HAS_EXPERT_REVIEW,         -- 是否进行专家论证\n" +
                    "    REVIEW_CONCLUSION_FILE,    -- 论证结论(文件名 另提供附件)\n" +
                    "    ChangeProcess,             -- 变更环节\n" +
                    "    ChangeType,                -- 变更类型\n" +
                    "    ApprovalTime,              -- 批复时间\n" +
                    "    ShowTime,                  -- 出示时间\n" +
                    "    FILENAME,                   -- 文件中文名\n" +
                    "    PROTYPE                   -- 文件中文名\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC, -- 项目名称（非空，≤255位，如'XX产业园配套道路工程'）\n" +
                    "    XMBH, -- 项目编号\n" +
                    "    BDMC, -- 标段名称\n" +
                    "    BDBH, -- 标段编号\n" +
                    "    SQBGDW, -- 申请变更单位（如'XX设计研究院有限公司'）\n" +
                    "    NULL, -- 设计变更金额(元)（NUMBER(15,2)，如568900.50）\n" +
                    "    BGHJ, -- 设计变更内容（≤255位，如'优化道路排水管网布局'）\n" +
                    "    NULL, -- 设计变更报批文件(文件名 另提供附件)（如'排水管网变更报批文件.pdf'）\n" +
                    "    NULL, -- 报批时间（格式如'2025-02-10'）\n" +
                    "    ZZPFDW, -- 批复单位（如'XX市建设工程设计审查中心'）\n" +
                    "    PFSJ, -- 批复时间（格式如'2025-02-18'）\n" +
                    "    PFWJFWDZ, -- 批复文件(文件名 另提供附件)（如'排水管网变更批复文件.pdf'）\n" +
                    "    NULL, -- 是否进行专家论证（VARCHAR2(1)，填'Y'=是/'N'=否）\n" +
                    "    NULL, -- 论证结论(文件名 另提供附件)（如'排水管网变更专家论证报告.pdf'）\n" +
                    "    BGHJ, -- 变更环节（如'初步设计变更'/'施工图设计变更'）\n" +
                    "    BGLX, -- 变更类型（如'技术变更'/'工程量变更'/'材料变更'）\n" +
                    "    PFSJ, -- 批复时间（格式如'2025-02-18'，与APPROVAL_DATE保持一致）\n" +
                    "    NULL, -- 出示时间（格式如'2025-02-20'）\n" +
                    "    PFWJMC,  -- 文件中文名（≤50位，如'XX道路排水管网设计变更资料'）\n" +
                    "    'GH'  -- 区分单位（≤50位，如'XX道路排水管网设计变更资料'）\n" +
                    "FROM API_SJCS_BGGLB;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IAViewJttSafeManageService iaViewJttSafeManageService;

    @Override
    public void JJAQGL() {
        doTask("安全管理表","API_A_VIEW_JTT_SAFE_MANAGE",JJAQGLUrl,JJAQGLToken,orgCode,500,500,null,null,iaViewJttSafeManageService,AViewJttSafeManage.class);
        try {
            String deleteSql = "DELETE FROM API_SAFETY_MANAGEMENT WHERE PROJECT_NAME IN (SELECT PROJECT_NAME FROM API_A_VIEW_JTT_SAFE_MANAGE)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_SAFETY_MANAGEMENT (\n" +
                    "    PROJECT_NAME,                -- 项目名称（非空，必须替换）\n" +
                    "    PROJECT_CODE,                -- 项目编号\n" +
                    "    SECTION_NAME,                -- 标段名称\n" +
                    "    SECTION_CODE,                -- 标段编号\n" +
                    "    YEAR,                        -- 年份（非空，必须替换）\n" +
                    "    INSPECTION_PLAN,             -- 年度检查计划\n" +
                    "    INSPECTION_UNIT,             -- 检查单位(执法局、交建局治安处)\n" +
                    "    INSPECTION_LEADER,           -- 检查负责人\n" +
                    "    LEADER_CONTACT,              -- 负责人联系方式\n" +
                    "    INSPECTION_DATE,             -- 检查时间\n" +
                    "    ANNUAL_PROGRESS,             -- 年进度\n" +
                    "    INSPECTION_RECORD_FILE,      -- 检验记录文件\n" +
                    "    HAS_PROBLEM,                 -- 是否存在问题(是非空，必须替换)\n" +
                    "    PROBLEM_DESCRIPTION,         -- 问题描述\n" +
                    "    SAFETY_MANAGEMENT_INDEX,     -- 安全管理指数\n" +
                    "    RECTIFICATION_REQUIREMENT,   -- 整改要求(文件名 另提供附件)\n" +
                    "    IS_RECTIFICATION_CONFIRMED,  -- 整改后是否确认(是非空，必须替换)\n" +
                    "    RECTIFICATION_MATERIAL,      -- 问题整改材料\n" +
                    "    RECTIFICATION_REPORT_DATE,   -- 问题整改材料上报时间\n" +
                    "    IS_PROBLEM_SOLVED,            -- 问题是否解决(是非空，必须替换)\n" +
                    "\tMSFILENAME,\n" +
                    "\tZGFILENAME\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    PROJECT_NAME, -- 项目名称（非空，必须替换为实际名称，如'XX隧道建设项目'）\n" +
                    "    PROJECT_CODE, -- 项目编号\n" +
                    "    TENDER_CODE, -- 标段名称\n" +
                    "    NULL, -- 标段编号\n" +
                    "    NULL, -- 年份（非空，必须替换为4位字符串，如'2024'）\n" +
                    "    NULL, -- 年度检查计划\n" +
                    "    CHECK_UNIT, -- 检查单位(执法局、交建局治安处)\n" +
                    "    CHECK_LEADER, -- 检查负责人\n" +
                    "    NULL, -- 负责人联系方式（VARCHAR2(20)，填手机号或固话）\n" +
                    "    CHECK_TIME, -- 检查时间（格式如'2024-12-05'）\n" +
                    "    NULL, -- 年进度（如'90%'）\n" +
                    "    NULL, -- 检验记录文件\n" +
                    "    CASE \n" +
                    "        WHEN IS_HAS_PROBLEM = '1' THEN '是'\n" +
                    "        ELSE '否'\n" +
                    "    END, -- 是否存在问题（VARCHAR2(2)，建议填'是'/'否'） \n" +
                    "    NULL, -- 问题描述（VARCHAR2(1000)，支持长文本）\n" +
                    "    NULL, -- 安全管理指数（NUMBER(5,2)，如95.75）\n" +
                    "    NULL, -- 整改要求(文件名 另提供附件)\n" +
                    "    NULL, -- 整改后是否确认(是非空，必须替换，如'已确认'/'未确认')\n" +
                    "    NULL, -- 问题整改材料\n" +
                    "    RECTIFY_DATA, -- 问题整改材料上报时间（DATE类型，填TO_DATE('2024-12-10','YYYY-MM-DD')）\n" +
                    "    NULL,  -- 问题是否解决(是非空，必须替换为'已解决'/'未解决')\n" +
                    "\tNULL,\n" +
                    "\tNULL\n" +
                    "FROM API_A_VIEW_JTT_SAFE_MANAGE;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IAViewLaborContractService iaViewLaborContractService;

    @Override
    public void JJFBGL() {
        doTask("分包管理表","API_A_VIEW_LABOR_CONTRACT",JJFBGLUrl,JJFBGLToken,orgCode,500,500,null,null,iaViewLaborContractService,AViewLaborContract.class);
        try {
            String deleteSql = "DELETE FROM API_SUBCONTRACT_MANAGEMENT WHERE PROJECT_NAME IN (SELECT PROJECT_NAME FROM API_A_VIEW_LABOR_CONTRACT)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_SUBCONTRACT_MANAGEMENT (\n" +
                    "    PROJECT_NAME,                -- 项目名称\n" +
                    "    PROJECT_CODE,                -- 项目编号\n" +
                    "    SECTION_NAME,                -- 标段名称\n" +
                    "    SECTION_CODE,                -- 标段编号\n" +
                    "    CONTRACTOR,                  -- 承包单位\n" +
                    "    CONTRACT_TYPE,               -- 类型(分包/劳务外包)（仅允许这两个值）\n" +
                    "    SUBCONTRACT_PROJECT,         -- 分包/外包工程\n" +
                    "    SUBCONTRACT_COMPANY,         -- 分包/劳务外包单位\n" +
                    "    APPROVAL_MATERIAL,           -- 报批材料(文件名 另提供附件)\n" +
                    "    APPROVAL_FILE,               -- 批复文件(文件名 另提供附件)\n" +
                    "    APPROVAL_DATE,               -- 批复时间\n" +
                    "    CONTRACT_FILE,               -- 分包/外包合同(文件名 另提供附件)\n" +
                    "    CONTRACT_RECORD_FILE,        -- 合同备案(文件名 另提供附件)\n" +
                    "    CREATE_TIME,                 -- 创建时间\n" +
                    "    UPDATE_TIME,                 -- 更新时间\n" +
                    "    CONTRACT_RECORD_ID,          -- 分包/外包合同编号\n" +
                    "    ApprovalUnit,                -- 批复单位\n" +
                    "    SubcontractingUnitCode,      -- 分包单位代码\n" +
                    "    Subcontractor,               -- 分包单位\n" +
                    "    QualificationDocuments,      -- 分包单位资质文件\n" +
                    "    LegalPerson,                 -- 法人\n" +
                    "    LegalContactInformation,     -- 法人联系方式\n" +
                    "    SiteSupervisor,              -- 分包单位现场负责人\n" +
                    "    ContactInformation,           -- 分包单位现场负责人联系方式\n" +
                    "\tFILENAME,\n" +
                    "\tHTFILENAME\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    PROJECT_NAME, -- 项目名称\n" +
                    "    PROJECT_CODE, -- 项目编号\n" +
                    "    TENDER_CODE, -- 标段名称\n" +
                    "    TENDER_NAME, -- 标段编号\n" +
                    "    CONTRACTING_UNIT, -- 承包单位\n" +
                    "    TYPE, -- 类型(分包/劳务外包)（后续需填'分包'或'劳务外包'，否则违反CHECK约束）\n" +
                    "    NULL, -- 分包/外包工程\n" +
                    "    NULL, -- 分包/劳务外包单位\n" +
                    "    NULL, -- 报批材料(文件名 另提供附件)\n" +
                    "    URL, -- 批复文件(文件名 另提供附件)\n" +
                    "    NULL, -- 批复时间（DATE类型，后续填TO_DATE('2024-11-10','YYYY-MM-DD')）\n" +
                    "    NULL, -- 分包/外包合同(文件名 另提供附件)\n" +
                    "    NULL, -- 合同备案(文件名 另提供附件)\n" +
                    "    NULL, -- 创建时间（DATE类型，后续填TO_DATE('2024-11-01','YYYY-MM-DD')）\n" +
                    "    NULL, -- 更新时间（DATE类型，后续填TO_DATE('2024-11-02','YYYY-MM-DD')）\n" +
                    "    NULL, -- 分包/外包合同编号\n" +
                    "    NULL, -- 批复单位\n" +
                    "    NULL, -- 分包单位代码\n" +
                    "    CPT_UNIT, -- 分包单位\n" +
                    "    NULL, -- 分包单位资质文件\n" +
                    "    NULL, -- 法人\n" +
                    "    NULL, -- 法人联系方式\n" +
                    "    LEADER, -- 分包单位现场负责人\n" +
                    "    NULL,  -- 分包单位现场负责人联系方式\n" +
                    "\tORIGINAL,\n" +
                    "\tNULL\n" +
                    "FROM API_A_VIEW_LABOR_CONTRACT;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }
    @Resource
    private IAViewJttWorkerPayService iaViewJttWorkerPayService;

    @Override
    public void JJZJGL() {
        doTask("资金管理","API_A_VIEW_JTT_WORKER_PAY",JJZJGLUrl,JJZJGLToken,orgCode,500,500,null,null,iaViewJttWorkerPayService,AViewJttWorkerPay.class);
        try {
            String deleteSql = "DELETE FROM API_Migrant_workers WHERE PK_ID IN (SELECT PROJECT_NAME FROM API_A_VIEW_JTT_WORKER_PAY)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_Migrant_workers (\n" +
                    "    PK_ID,            -- 项目名称\n" +
                    "    XMID,             -- 项目编号\n" +
                    "    XMNAME,           -- 标段名称\n" +
                    "    XMBH,             -- 标段编号\n" +
                    "    NY,               -- 年月\n" +
                    "    SHDJNM,           -- 实名登记农名人数\n" +
                    "    AYZEZFRS,         -- 按月足额支付人数\n" +
                    "    LQBFSHFRS         -- 领取部分生活费人数\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    PROJECT_NAME, -- 项目名称\n" +
                    "    PROJECT_CODE, -- 项目编号\n" +
                    "    TENDER_NAME, -- 标段名称\n" +
                    "    TENDER_NAME, -- 标段编号\n" +
                    "    PAY_TIME, -- 年月（DATE类型，后续填TO_DATE('2024-11','YYYY-MM')）\n" +
                    "    WORKER_NUM, -- 实名登记农名人数（NUMERIC(10,0)，仅填整数，如150）\n" +
                    "    PAY_NUM, -- 按月足额支付人数（NUMERIC(10,0)，仅填整数，如145）\n" +
                    "    NULL  -- 领取部分生活费人数（NUMERIC(10,0)，仅填整数，如5）\n" +
                    "FROM API_A_VIEW_JTT_WORKER_PAY;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }
    @Resource
    private IAViewJttQualityManageService iaViewJttQualityManageService;

    @Override
    public void JJZLGL() {
        doTask("质量管理","API_A_VIEW_JTT_QUALITY_MANAGE",JJZLGLUrl,JJZLGLToken,orgCode,500,500,null,null,iaViewJttQualityManageService,AViewJttQualityManage.class);
        try {
            String deleteSql = "DELETE FROM API_QUALITY_MANAGEMENT WHERE PROJECT_NAME IN (SELECT PROJECT_NAME FROM API_A_VIEW_JTT_QUALITY_MANAGE)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_QUALITY_MANAGEMENT ( \n" +
                    "    PROJECT_NAME,                -- 项目名称 \n" +
                    "    PROJECT_CODE,                -- 项目编号 \n" +
                    "    SECTION_NAME,                -- 标段名称 \n" +
                    "    SECTION_CODE,                -- 标段编号 \n" +
                    "    YEAR,                        -- 年份 \n" +
                    "    INSPECTION_PLAN_FILE,        -- 年度检查计划(文件名 另提供附件) \n" +
                    "    INSPECTION_UNIT,             -- 检查单位（执法局、交建局治安处） \n" +
                    "    INSPECTION_LEADER,           -- 检查负责人 \n" +
                    "    LEADER_CONTACT,              -- 负责人联系方式 \n" +
                    "    INSPECTION_DATE,             -- 检查时间 \n" +
                    "    ANNUAL_PROGRESS,             -- 年进度 \n" +
                    "    INSPECTION_RECORD_FILE,      -- 检验记录文件（文件名 另提供附件） \n" +
                    "    HAS_PROBLEM,                 -- 是否存在问题 \n" +
                    "    PROBLEM_DESCRIPTION,         -- 问题描述 \n" +
                    "    RECTIFICATION_REQUIREMENT_FILE, -- 整改要求(文件名 另提供附件) \n" +
                    "    IS_RECTIFICATION_CONFIRMED,  -- 整改后是否确认 \n" +
                    "    RECTIFICATION_REPORT_DATE,   -- 问题整改材料上报时间 \n" +
                    "    RECTIFICATION_MATERIAL_FILE, -- 问题整改材料(文件名 另提供附件) \n" +
                    "    IS_PROBLEM_SOLVED,           -- 问题是否解决 \n" +
                    "    YCLHGL,                       -- 原材料抽检合格率 \n" +
                    "    WTFILENAME, \n" +
                    "    ZGFILENAME \n" +
                    ") \n" +
                    "SELECT \n" +
                    "    PROJECT_NAME, -- 项目名称 \n" +
                    "    PROJECT_CODE, -- 项目编号 \n" +
                    "    TENDER_NAME, -- 标段名称 \n" +
                    "    PROJECT_CODE, -- 标段编号 \n" +
                    "    NULL, -- 年份（VARCHAR2(4)，后续填如'2024'） \n" +
                    "    NULL, -- 年度检查计划(文件名 另提供附件) \n" +
                    "    CHECK_UNIT, -- 检查单位（执法局、交建局治安处） \n" +
                    "    CHECK_LEADER, -- 检查负责人 \n" +
                    "    NULL, -- 负责人联系方式（VARCHAR2(20)，填手机号或固话） \n" +
                    "    CHECK_TIME, -- 检查时间（格式如'2024-11-20'） \n" +
                    "    NULL, -- 年进度（如'85%'） \n" +
                    "    NULL, -- 检验记录文件（文件名 另提供附件） \n" +
                    "    -- 使用CASE语句进行条件转换\n" +
                    "    CASE \n" +
                    "        WHEN IS_HAS_PROBLEM = '1' THEN '是'\n" +
                    "        ELSE '否'\n" +
                    "    END, -- 是否存在问题（VARCHAR2(2)，建议填'是'/'否'） \n" +
                    "    PROBLEM_DESCRIBE, -- 问题描述（VARCHAR2(1000)，支持长文本） \n" +
                    "    NULL, -- 整改要求(文件名 另提供附件) \n" +
                    "    NULL, -- 整改后是否确认（如'已确认'/'未确认'） \n" +
                    "    NULL, -- 问题整改材料上报时间（格式如'2024-11-25'） \n" +
                    "    NULL, -- 问题整改材料(文件名 另提供附件) \n" +
                    "    NULL, -- 问题是否解决（VARCHAR2(2)，建议填'是'/'否'） \n" +
                    "    NULL,  -- 原材料抽检合格率（如'98.5%'） \n" +
                    "    PROBLEM_DESCRIBE_NAME, \n" +
                    "    NULL \n" +
                    "FROM API_A_VIEW_JTT_QUALITY_MANAGE;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }
    @Resource
    private IAViewChangeManagementService iaViewChangeManagementService;

    @Override
    public void JJBGGL() {
        doTask("变更管理","API_A_VIEW_CHANGE_MANAGEMENT",JJBGGLUrl,JJBGGLToken,orgCode,500,500,null,null,iaViewChangeManagementService,AViewChangeManagement.class);
        try {
            String deleteSql = "DELETE FROM API_DESIGN_CHANGE_MANAGEMENT WHERE PROJECT_NAME IN (SELECT PROJECT_NAME FROM API_A_VIEW_CHANGE_MANAGEMENT)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_DESIGN_CHANGE_MANAGEMENT (\n" +
                    "    PROJECT_NAME,              -- 项目名称（非空，必须替换）\n" +
                    "    PROJECT_CODE,              -- 项目编号\n" +
                    "    SECTION_NAME,              -- 标段名称\n" +
                    "    SECTION_CODE,              -- 标段编号\n" +
                    "    APPLICANT_UNIT,            -- 申请变更单位\n" +
                    "    CHANGE_AMOUNT,             -- 设计变更金额(元)\n" +
                    "    CHANGE_CONTENT,            -- 设计变更内容\n" +
                    "    APPLICATION_FILE,          -- 设计变更报批文件(文件名 另提供附件)\n" +
                    "    APPLICATION_DATE,          -- 报批时间\n" +
                    "    APPROVAL_UNIT,             -- 批复单位\n" +
                    "    APPROVAL_DATE,             -- 批复时间\n" +
                    "    APPROVAL_FILE,             -- 批复文件(文件名 另提供附件)\n" +
                    "    HAS_EXPERT_REVIEW,         -- 是否进行专家论证\n" +
                    "    REVIEW_CONCLUSION_FILE,    -- 论证结论(文件名 另提供附件)\n" +
                    "    ChangeProcess,             -- 变更环节\n" +
                    "    ChangeType,                -- 变更类型\n" +
                    "    ApprovalTime,              -- 批复时间\n" +
                    "    ShowTime,                  -- 出示时间\n" +
                    "    FILENAME,                   -- 文件中文名\n" +
                    "    PROTYPE                   -- 区分单位\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    PROJECT_NAME, -- 项目名称（非空，必须替换为实际名称，如'XX桥梁改造项目'）\n" +
                    "    PROJECT_CODE, -- 项目编号\n" +
                    "    TENDER_NAME, -- 标段名称\n" +
                    "    TENDER_CODE, -- 标段编号\n" +
                    "    CONTRACTING_UNIT, -- 申请变更单位\n" +
                    "    NULL, -- 设计变更金额(元)（NUMBER(15,2)，后续填如123456.78）\n" +
                    "    CHANGE_REASON, -- 设计变更内容\n" +
                    "    NULL, -- 设计变更报批文件(文件名 另提供附件)\n" +
                    "    NULL, -- 报批时间（格式如'2024-11-01'）\n" +
                    "    PF_DEPT, -- 批复单位\n" +
                    "    PF_DATE, -- 批复时间（格式如'2024-11-05'）\n" +
                    "    PF_FILE_URL, -- 批复文件(文件名 另提供附件)\n" +
                    "    NULL, -- 是否进行专家论证（VARCHAR(1)，填'Y'=是/'N'=否）\n" +
                    "    NULL, -- 论证结论(文件名 另提供附件)\n" +
                    "    NODE, -- 变更环节\n" +
                    "    CHANGE_CATEGORY_DEGREE\n, -- 变更类型\n" +
                    "    NULL, -- 批复时间（格式如'2024-11-05'）\n" +
                    "    NULL, -- 出示时间（格式如'2024-11-06'）\n" +
                    "    PF_FILE_NAME,  -- 文件中文名\n" +
                    "    'JJ'  -- 区分单位\n" +
                    "FROM API_A_VIEW_CHANGE_MANAGEMENT;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IAViewProblemRectificationService iaViewProblemRectificationService;

    @Override
    public void JJGZSJ() {
        doTask("跟踪审计","API_A_VIEW_PROBLEM_RECTIFICATION",JJGZSJUrl,JJGZSJToken,orgCode,500,500,null,null,iaViewProblemRectificationService,AViewProblemRectification.class);
        try {
            String deleteSql = "DELETE FROM API_Auditing_Info WHERE PROJECT_NAME IN (SELECT PROJECT_NAME FROM API_A_VIEW_PROBLEM_RECTIFICATION)";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);

            String insertSql = "INSERT INTO DIMENMODEL.API_Auditing_Info (\n" +
                    "    Project_No,                  -- 项目编号\n" +
                    "    Bid_Section_No,              -- 标段编号\n" +
                    "    Bid_Section_Name,            -- 标段名称\n" +
                    "    Auditing_Unit,               -- 审计单位\n" +
                    "    Auditing_Responsible_Person, -- 审计负责人员\n" +
                    "    Auditing_Content,            -- 审计内容\n" +
                    "    Auditing_Time,               -- 审计时间\n" +
                    "    Auditing_Report,             -- 审计报告\n" +
                    "    PROJECT_NAME,                 -- 项目名称\n" +
                    "\tFILENAME\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    PROJECT_CODE, -- 项目编号\n" +
                    "    TENDER_CODE, -- 标段编号\n" +
                    "    TENDER_NAME, -- 标段名称\n" +
                    "    UNIT, -- 审计单位\n" +
                    "    LEADER, -- 审计负责人员\n" +
                    "    TYPE, -- 审计内容\n" +
                    "    AUDIT_DATE, -- 审计时间（格式如'2024-12-10'或'2024年12月'）\n" +
                    "    URL, -- 审计报告（文件名，另提供附件）\n" +
                    "    PROJECT_NAME,  -- 项目名称（VARCHAR2(50)，长度≤50位）\n" +
                    "\tORIGINAL\n" +
                    "FROM API_A_VIEW_PROBLEM_RECTIFICATION;";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }

    @Resource
    private IY029XmkSjcsService iy029XmkSjcsService;

    @Override
    public void GDXXB() {
        doTask("国道项目库","API_Y029_XMK_SJCS",GDXXBUrl,GDXXBToken,orgCode,500,500,null,null,iy029XmkSjcsService,Y029XmkSjcs.class);
        try {
            String deleteSql = "DELETE FROM API_PROJECT_INFO WHERE PROTYPE = 'GD'";
            int update = jdbcTemplate.update(deleteSql);
            log.info("执行删除语句，删除{}条数据", update);
            String insertSql = "INSERT INTO DIMENMODEL.API_PROJECT_INFO (\n" +
                    "    PROJECT_NAME,              -- 非空：项目名称（必填）\n" +
                    "    PROJECT_CODE,              -- 项目编号（VARCHAR2(36)）\n" +
                    "    CONSTRUCTION_UNIT,         -- 建设单位\n" +
                    "    MANAGEMENT_TYPE,           -- 管理类型\n" +
                    "    PROJECT_TYPE,              -- 项目类型（铁路/高速公路等）\n" +
                    "    CONSTRUCTION_STATUS,       -- 建设状态\n" +
                    "    TOTAL_INVESTMENT,          -- 总投资（亿，NUMBER(18,2)）\n" +
                    "    CONSTRUCTION_STANDARD,     -- 建设标准\n" +
                    "    PROJECT_SCALE,             -- 项目规模（公里，NUMBER(18,5)）\n" +
                    "    PROJECT_PROGRESS,          -- 项目进度(九大环节)\n" +
                    "    START_POINT,               -- 项目建设起点（经纬度）\n" +
                    "    END_POINT,                 -- 项目建设终点（经纬度）\n" +
                    "    IS_SECTIONED,              -- 项目是否分标段（如'Y'/'N'）\n" +
                    "    DESIGN_SPEED,              -- 设计时速（kmh）\n" +
                    "    CONSTRUCTION_PERIOD,       -- 建设周期\n" +
                    "    APPROVAL_DATE,             -- 立项日期（字符串格式，如'2024-01-01'）\n" +
                    "    START_DATE,                -- 开工日期（字符串格式）\n" +
                    "    PLAN_END_DATE,             -- 计划竣工日期（字符串格式）\n" +
                    "    PLAN_COMPLETION_DATE,      -- 计划完成时间（字符串格式）\n" +
                    "    IS_COMPLETED_OR_ADVANCED,  -- 项目是否完成或提前结束（如'Y'/'N'）\n" +
                    "    UNIT,                      -- 实施主体\n" +
                    "    BDNUMBER,                  -- 标段总数（NUMBER(22,2)）\n" +
                    "    YWCTZE,                    -- 已完成投资额（NUMBER(22,2)）\n" +
                    "    PROTYPE,                   -- 项目类型（区分单位）\n" +
                    "    SPTIME,                    -- 审批时间（DATETIME(0)类型）\n" +
                    "    SPEND                      -- 审批有效期（DATETIME(0)类型）\n" +
                    ")\n" +
                    "SELECT\n" +
                    "    XMMC,  -- PROJECT_NAME：需补充（非空，如源表.项目名称字段）\n" +
                    "    NULL,  -- PROJECT_CODE：可补充项目编号（建议36位内）\n" +
                    "    NULL,  -- CONSTRUCTION_UNIT：可补充建设单位\n" +
                    "    NULL,  -- MANAGEMENT_TYPE：可补充管理类型\n" +
                    "    XMLX,  -- PROJECT_TYPE：可补充项目类型（匹配注释枚举值）\n" +
                    "    JSZT,  -- CONSTRUCTION_STATUS：可补充建设状态\n" +
                    "    ZTZ,  -- TOTAL_INVESTMENT：可补充总投资（数字，保留2位小数）\n" +
                    "    JSBZ,  -- CONSTRUCTION_STANDARD：可补充建设标准\n" +
                    "    ZLC,  -- PROJECT_SCALE：可补充项目规模（数字，保留5位小数）\n" +
                    "    XMJD,  -- PROJECT_PROGRESS：可补充项目进度（九大环节描述）\n" +
                    "    NULL,  -- START_POINT：可补充起点经纬度（如'116.40,39.90'）\n" +
                    "    NULL,  -- END_POINT：可补充终点经纬度\n" +
                    "    NULL,  -- IS_SECTIONED：可补充（'Y'分标段/'N'不分）\n" +
                    "    NULL,  -- DESIGN_SPEED：可补充设计时速（如'120'）\n" +
                    "    NULL,  -- CONSTRUCTION_PERIOD：可补充建设周期（如'2年'）\n" +
                    "    LXSJ,  -- APPROVAL_DATE：可补充立项日期（字符串格式）\n" +
                    "    KGRQ,  -- START_DATE：可补充开工日期（字符串格式）\n" +
                    "    JHJGRQ,  -- PLAN_END_DATE：可补充计划竣工日期（字符串格式）\n" +
                    "    JHWCSJ,  -- PLAN_COMPLETION_DATE：可补充计划完成时间（字符串格式）\n" +
                    "    NULL,  -- IS_COMPLETED_OR_ADVANCED：可补充（'Y'/'N'）\n" +
                    "    SSZT,  -- UNIT：可补充实施主体\n" +
                    "    NULL,  -- BDNUMBER：可补充标段总数（数字）\n" +
                    "    YWCTZ,  -- YWCTZE：可补充已完成投资额（数字）\n" +
                    "    'GD',  -- PROTYPE：可补充项目类型（区分单位）\n" +
                    "    NULL,  -- SPTIME：可补充审批时间（如TO_DATE(源表.审批时间, 'yyyy-mm-dd')）\n" +
                    "    NULL   -- SPEND：可补充审批有效期（如TO_DATE(源表.有效期, 'yyyy-mm-dd')）\n" +
                    "-- 替换为你的实际源表，后续自行补充字段映射\n" +
                    "FROM API_Y029_XMK_SJCS";
            int insert = jdbcTemplate.update(insertSql);
            log.info("执行插入语句，插入{}条数据", insert);
        } catch (Exception e) {
            throw new RuntimeException("数据同步失败:" + e.getMessage(),e);
        }
    }


    /**
     * 采集数据
     * @param url 接口url
     * @param token 接口token
     * @param orgCode 组织编码
     * @param limit 每次接口返回数据量 默认500
     * @param saveSize 批处理单次提交数量 默认与limit 保持一致
     * @param params 附件查询规则
     * @param sortInfo 附件排序规则
     * @param service 服务类
     * @param clazz 实体类
     * @param <T>
     */
    private <T> void doTask(String key,String tableName,String url, String token, String orgCode, Integer limit, Integer saveSize, JSONObject params, JSONObject sortInfo, IService<T> service,Class clazz) {
        log.info("同步{}开始",key);
        //清空源数据
        dataGatherMapper.deleteAll(tableName);
        //接口数据总量
        Integer count = 0;
        Integer pageNo = 1;
        //每页数据量，默认最大值500
        Integer pageSize = null!=limit?limit:500;
        //批处理单次提交数量，默认与每页数据量一致
        Integer batchSize = null!=saveSize?saveSize:pageSize;
        while(true) {
            List<T> resList = ApiUtils.getApiData(url,token,orgCode,pageNo++,pageSize,params,sortInfo,clazz);
            if(CollectionUtils.isEmpty(resList)) {
                break;
            }
            //保持到数据库
            service.saveBatch(resList,batchSize);
            count += resList.size();
            //线程休眠50毫秒
            try {Thread.sleep(50);} catch (Exception e) {}
        }
        log.info("同步{}结束,数据总量{}",key,count);
    }

}
